coreutils
coreutils copied to clipboard
touch: "setting times of" instead of "cannot touch" for an existing file the user cannot write
# f is root:root, mode 644; run as nobody
$ touch f
touch: setting times of 'f': Permission denied
GNU 9.12 (built from source) prints touch: cannot touch 'f': Permission denied. uutils uses "cannot touch" only when it fails to create a missing file; for an existing file any failure is reported as "setting times of".
uutils main at 2b85f6f12, Linux.
Thanks for reporting this. I reproduced the error and opened #15161 with a fix. The PR changes the message to cannot touch for these access failures and adds tests for both an unwritable existing file and an inaccessible parent directory. I also checked that the existing wording for -c and -h stays as it is.