I am wondering why chmod changes files and folder dates/timestamps? I use OpenSUSE 11.3.
I have other machines running CentOS 5.5 (RedHat) and Ubuntu on which this does not happen. My users are getting crazy with this because they cannot track when they made modifications on their files (real changes, not chmod).
Is there a way to preserve this information? I read the man put did not find any parameter.
Was there a new behaviour in latest versions of chmod?
On 10/21/2011 03:46 PM, hanapurna wrote:
>
> Hello everybody,
>
> I am wondering why chmod changes files and folder dates/timestamps? I
> use OpenSUSE 11.3.
>
> I have other machines running CentOS 5.5 (RedHat) and Ubuntu on which
> this does not happen. My users are getting crazy with this because they
> cannot track when they made modifications on their files (real changes,
> not chmod).
>
> Is there a way to preserve this information? I read the man put did not
> find any parameter.
>
> Was there a new behaviour in latest versions of chmod?
>
> Thanks for your help.
>
>
i don’t think chmod changes date/times…
at least i can say it does not here:
denver@linux-os114:~/test> ls -hal
drwx------ 2 denverd users 4.0K Oct 21 16:00 ./
drwxr-xr-x 69 denverd users 4.0K Oct 21 16:00 ../
-rw-r--r-- 1 denverd users 1.1M Jun 29 10:17 danid.log.1
-rw------- 1 denverd users 189 Jun 30 02:53 nohup.out
-rw-r--r-- 1 denverd users 155 Oct 18 15:28 sigSUSE
-rw-r--r-- 1 denverd users 9 Mar 1 2011 sigSUSEguest
-rw-r--r-- 1 denverd users 87 Jun 12 19:14 sigSUSE-longBAK
-rw-r--r-- 1 denverd users 251 Mar 11 2011 sigTELE
denverd@linux-os114:~/test> chmod 777 *
denverd@linux-os114:~/test> ls -hal
total 1.1M
drwx------ 2 denverd users 4.0K Oct 21 16:00 ./
drwxr-xr-x 69 denverd users 4.0K Oct 21 16:00 ../
-rwxrwxrwx 1 denverd users 1.1M Jun 29 10:17 danid.log.1*
-rwxrwxrwx 1 denverd users 189 Jun 30 02:53 nohup.out*
-rwxrwxrwx 1 denverd users 155 Oct 18 15:28 sigSUSE*
-rwxrwxrwx 1 denverd users 9 Mar 1 2011 sigSUSEguest*
-rwxrwxrwx 1 denverd users 87 Jun 12 19:14 sigSUSE-longBAK*
-rwxrwxrwx 1 denverd users 251 Mar 11 2011 sigTELE*
denverd@linux-os114:~/test>
try it yourself…if you get date/time changes please do as i did and
show both your input and the output…copy/paste the output back to this
thread using the instructions here: http://goo.gl/i3wnr
Notice that while the Modify time did not change the ‘Change’ time did.
This is my root filesystem which has noatime set in the /etc/fstab file
so I do not know if this would behave the same way without ‘noatime’
set. Generally noatime is a good thing to have set but it is not a
default in SUSE-land.
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
Tested again… lacking ‘noatime’ did NOT cause the Modify timestamps
to be updated. Knowing more about the filesystem involved may be
helpful (output from mount command with a note about where the files
are in the filesystem).
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/