bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug#497514: coreutils: chmod, chown, and chgrp change ctime even whe


From: Eric Blake
Subject: Re: Bug#497514: coreutils: chmod, chown, and chgrp change ctime even when no change was necessary
Date: Thu, 11 Sep 2008 21:20:21 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paul Eggert on 9/11/2008 11:56 AM:
> 
> As I read the spec, chown and chgrp are explicitly required to make
> the equivalent of a chown() call, which in turn is required to change
> the ctime.  However, chmod is not required to make the equivalent of a
> chmod() call, and there is no requirement in the 'chmod' spec that it
> change the ctime.  So POSIX allows the optimization for the 'chmod'
> command, but not for the 'chown' and 'chgrp' commands.

On the other hand, the POSIX spec for chmod(1) mentions that it is
implementation defined on how it affects alternate access control.  I have
come to expect on many systems that support ACLs, that 'chmod 755' on a
file with rwxr-xr-x+ permissions will remove the ACLs.  In other words,
optimizing away the chmod(2) call because it compares equal to the stat
information would break this side-effect of clearing ACLs.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjJ3/UACgkQ84KuGfSFAYAjhACdFl0013RJgN8wk9ay0tO0Icts
tiEAoKH2Sp5qaStFBGRo61omIOPCUMGO
=zlNv
-----END PGP SIGNATURE-----




reply via email to

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