develooper Front page | perl.perl5.porters | Postings from March 2014

Re: -l on win32, VMS etc Was: [perl #72028] execute permissionmissing from some utils

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 29, 2014 19:09
Subject:
Re: -l on win32, VMS etc Was: [perl #72028] execute permissionmissing from some utils
Message ID:
20140329190933.GX1615@iabyn.com
(changing the subject line to ensure any followups are attached to the
ticket)

On Wed, Mar 26, 2014 at 01:08:55PM +0000, Zefram wrote:
> Dave Mitchell wrote:
> >and I want to change it to 
> >
> >    chmod 0666, $file unless -l $file;
> >    unlink $file;
> 
> That wouldn't be correct: it still screws up on hard links.  Long-standing
> problem [perl #72028].

Yes, that's the ticket I'm looking at fixing.

But thinking a little further, it makes no sense (on UNIXy systems at
least) to do the chmod before unlinking a file, since it's the permissions
of the directory, not the file, that determine whether a file can be
unlinked.

So I guess the chmod 066 is only for Windows etc? Do platforms like that
emulate chmod, and does such a chmod help delete a file that been
previously installed 0444 or equivalent?

I think I'm a bit out of my depth on such portability issues, and I think
I'll stop working on this ticket.

-- 
Monto Blanco... scorchio!

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