GNU bug report logs - #22185
Operation not permitted for `touch -d` on 777 file

Previous Next

Package: coreutils;

Reported by: Silvio Ricardo Cordeiro <silvioricardoc <at> gmail.com>

Date: Wed, 16 Dec 2015 16:42:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Silvio Ricardo Cordeiro <silvioricardoc <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Operation not permitted for `touch -d` on 777 file
Date: Wed, 16 Dec 2015 12:39:41 -0200
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.