gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: extended attributes


From: Brian May
Subject: Re: [Gnu-arch-users] Re: extended attributes
Date: Wed, 07 Jan 2004 10:42:23 +1100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

>>>>> "Jan" == Jan Hudec <address@hidden> writes:

    >> For atomic file updates, rename(2) does too much.  It modifies
    >> or creates a directory entry to have default ownership,
    >> permissions and time values.

    Jan> Do I need to remind you, that *directory entry* does NOT have
    Jan> any ownership, permission and time values? A *directory
    Jan> entry* has exactly a name and a number of inode it point
    Jan> to. At least for POSIX compliant filesystems.

What is needed is a system call (or user level call?) that creates a
new file with all the properties (times, owners, permissions, extended
attributes) based on an existing file. So you would say:

create file a.tmp from a
write to a.tmp
rename a.tmp to a

And most of the problems would be solved (I think!).

Taking Tom's example for instance:

touch --copy-meta-data-from foo.txt foo2.txt 
cat foo.txt | sed -e 's/Gnu/GNU/' > foo2.txt

Some additional now exist, for instance, what permissions does this
new function need to succeed? What if a is owned by another user? You
could still have write access.  What if you don't have write access to
the directory, should it still succeed? What if you don't have write
access to the file a?
-- 
Brian May <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]