develooper Front page | perl.perl5.porters | Postings from May 2012

Re: [perl #112760] mkdir in Perl 5.8.8 Fails to Set the Sticky Biton FreeBSD 7.1

Thread Previous | Thread Next
From:
Tony Cook
Date:
May 7, 2012 16:38
Subject:
Re: [perl #112760] mkdir in Perl 5.8.8 Fails to Set the Sticky Biton FreeBSD 7.1
Message ID:
20120507233750.GA513@mars.tony.develop-help.com
On Fri, May 04, 2012 at 04:54:07PM -0700, steve.siano@yahoo.com (via RT) wrote:
> # New Ticket Created by  steve.siano@yahoo.com 
> # Please include the string:  [perl #112760]
> # in the subject line of all future correspondence about this issue. 
> # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112760 >
> 
> 
> 
> This is a bug report for perl from steve.siano@yahoo.com,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 
> 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');"

perl 5.8.8 is no longer supported.

From man 8 sticky on FreeBSD 8.2:

BUGS
     Neither open(2) nor mkdir(2) will create a file with the sticky bit set.

This isn't a perl bug, I'm not sure it's worthwhile working around
this limitation on BSDs.

  mkdir -m 01775 foo

on FreeBSD does set the sticky bit, but it also ignores umask.

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About