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

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

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
June 12, 2008 20:54
Subject:
Re: [PATCH] File::Copy & permission bits.
Message ID:
c9ab31fc0806122054r7491d35lb2c4cfa795e10030@mail.gmail.com
On Tue, Jun 10, 2008 at 4:02 PM, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
> * 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.

>> 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.

I should have simply said '"new file" semantics' full stop.  Whether
it gets its permissions from the target environment or from a
hard-wired 0666 in a library routine, making a copied file do the same
thing as a new file created from scratch is different from making a
copied file preserve the permissions of the original.  I'm not saying
what's better, just trying to explain what's different.  It seems to
me both should be available one way or another.

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