bug-coreutils
[Top][All Lists]
Advanced

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

bug#22185: Operation not permitted for `touch -d` on 777 file


From: Silvio Ricardo Cordeiro
Subject: bug#22185: Operation not permitted for `touch -d` on 777 file
Date: Wed, 16 Dec 2015 12:39:41 -0200

The following code fails whenever the specified date is different from `now`:

$ mkdir testdir; chmod 777 testdir; cd testdir
$ touch file; chmod 777 file
$ su another_user
$ touch -d 'now' file  # works
$ touch -d 'yesterday' file  # fails
touch: setting times of ‘file’: Operation not permitted

I see no description of that in the documentation, and it just seems wrong. If other users have full control over the file (and surrounding directory), shouldn't they be able to change its date?

The same behavior is seen with `touch -t`.

Best,
--
Silvio Ricardo Cordeiro

reply via email to

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