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

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

Thread Previous | Thread Next
Craig A. Berry
June 12, 2008 20:54
Re: [PATCH] File::Copy & permission bits.
Message ID:
On Tue, Jun 10, 2008 at 4:02 PM, Aristotle Pagaltzis <> wrote:
> * Abigail <> [2008-06-10 10:20]:
>> On Mon, Jun 09, 2008 at 03:34:23PM +0200, Aristotle Pagaltzis wrote:
>> > * Craig A. Berry <> [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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About