develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [PATCH] File::Copy & permission bits.

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
June 10, 2008 14:02
Subject:
Re: [PATCH] File::Copy & permission bits.
Message ID:
20080610210210.GG25433@klangraum.plasmasturm.org
* Abigail <abigail@abigail.be> [2008-06-10 10:20]:
> On Mon, Jun 09, 2008 at 03:34:23PM +0200, Aristotle Pagaltzis wrote:
> > * Craig A. Berry <craig.a.berry@gmail.com> [2008-06-09 15:05]:
> > > Before Abigail's patch, the Unix copy() did roughly what
> > > the VMS and Win32 syscopy() implementations do: it followed
> > > "new file" semantics and created the target file with
> > > permissions inherited from the target environment.
> > 
> > Except, there is no such thing as permissions inherited from
> > the target environment on Unix. Maybe you could consider the
> > exec bits on the directories that are part of a file’s path
> > some kind of permission inheritance, but even that is a bit
> > of a stretch.
> 
> Well, one could argue that the umask is "permissions inherited
> from the target environment".

That has nothing to do with where in the filesystem the new file
ends up so it’s not the target environment. On Win32, files can
inherit permissions from the directory they’re in, which is why
not carrying the permissions along from the old file is OK and
even desirable. No such thing exists in Unix.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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