New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkdir in Perl 5.8.8 Fails to Set the Sticky Bit on FreeBSD 7.1 #12082
Comments
From steve.siano@yahoo.comThis is a bug report for perl from steve.siano@yahoo.com, The following does not set the sticky bit on FreeBSD, but it works on Linux: perl -e "umask 0000; mkdir('foo', 01777);" This behavior was observed on local disk and over NFS. However, chmod does set the sticky bit on FreeBSD and Linux: perl -e "umask 0000; chmod(01777, 'foo');" Flags: Site configuration information for perl v5.8.8: Configured by fai at Thu Feb 5 00:58:00 UTC 2009. Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Locally applied patches: @INC for perl v5.8.8: Environment for perl v5.8.8: |
From @tonycozOn Fri, May 04, 2012 at 04:54:07PM -0700, steve.siano@yahoo.com (via RT) wrote:
perl 5.8.8 is no longer supported. From man 8 sticky on FreeBSD 8.2: BUGS This isn't a perl bug, I'm not sure it's worthwhile working around mkdir -m 01775 foo on FreeBSD does set the sticky bit, but it also ignores umask. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @bingosOn Tue, May 08, 2012 at 09:37:50AM +1000, Tony Cook wrote:
I confirmed this on FreeBSD 7.4 with v5.8.9 and v5.14.0 Also behaves the same with v5.14.2 on FreeBSD 8.3 and 9.0 It also does on NetBSD 3.1 and 5.1.2 where man sticky says the same as on FreeBSD And the same on OpenBSD 5.1 which again says the same bug I haven't checked DragonflyBSD nor MirBSD, but the docs for http://leaf.dragonflybsd.org/cgi/web-man?command=sticky§ion=ANY Cheers, --
|
From steve.siano@yahoo.comThanks Tony for tracking down the root cause and thanks Chris for confirming it. Since it is a BSD bug and not a Perl bug, I've updated my code accordingly: if (mkdir($dir, $mode)) { if ($OS eq 'FreeBSD' && $mode & 01000) { Sincerely, Steve ----- Original Message ----- On Tue, May 08, 2012 at 09:37:50AM +1000, Tony Cook wrote:
I confirmed this on FreeBSD 7.4 with v5.8.9 and v5.14.0 Also behaves the same with v5.14.2 on FreeBSD 8.3 and 9.0 It also does on NetBSD 3.1 and 5.1.2 where man sticky says the same as on FreeBSD And the same on OpenBSD 5.1 which again says the same bug I haven't checked DragonflyBSD nor MirBSD, but the docs for http://leaf.dragonflybsd.org/cgi/web-man?command=sticky§ion=ANY Cheers, --
|
From @nwc10On Tue, May 08, 2012 at 11:12:39AM -0700, Steve Siano wrote:
You might want to use $^O instead of `uname`, as it saves some work. Nicholas Clark |
From @ikegamiOn Thu, May 10, 2012 at 4:37 AM, Nicholas Clark <nick@ccl4.org> wrote:
I would simply avoid both. if (mkdir($dir, $mode)) { |
From @ap* Tony Cook <tony@develop-help.com> [2012-05-08 01:40]:
To me it would seem that it is. Dealing with this limitation in Perl At the perl level it can be fixed with an #ifdef protecting a chmod There seems to be essentially zero downside to adding the workaround. At the same time I can’t see any upside in not adding it and thereby Regards, |
From @bingosOn Thu, May 10, 2012 at 09:37:21AM +0100, Nicholas Clark wrote:
Confirmed it on DragonflyBSD 3.0.2 now as well. --
|
From @jkeenanOn Sat May 12 00:18:14 2012, aristotle wrote:
Tony, Aristotle: Are there outstanding issues in this ticket that need addressing? Thank you very much. |
From @ap* James E Keenan via RT <perlbug-followup@perl.org> [2013-09-19 01:35]:
Yes: the original report. I am still of the opinion that a workaround |
From @LeontOn Sat, May 12, 2012 at 9:17 AM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote:
To quote POSIX: "When bits in *mode* other than the file permission bits
Sticky bits are uncommon enough that I think it's not worth the maintenence Leon |
From @ikegamiOn Sun, Sep 22, 2013 at 11:03 AM, Leon Timmermans <fawaka@gmail.com> wrote:
Just add that passage to mkdir's docs. |
I have the same problem on REHL8. |
In particular the sticky bit may or may not be set by the system mkdir() implementation. Fixes Perl#12082
In particular the sticky bit may or may not be set by the system mkdir() implementation. Fixes #12082
In particular the sticky bit may or may not be set by the system mkdir() implementation. Fixes Perl#12082
Migrated from rt.perl.org#112760 (status was 'open')
Searchable as RT112760$
The text was updated successfully, but these errors were encountered: