Skip to content
Snippets Groups Projects
Commit 77fd082f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Resolve failure to touch files when non-owner on *nix

ftouch(), semfile_signal(), and JS file_utime() would fail to update a file's access/mod times with errno=EPERM if not run as the file's owner. From "man utime":

EPERM times is not NULL, the caller's effective UID does not match the owner of the file, and the caller is not privileged (Linux: does not have the CAP_FOWNER capability).

So use a NULL times parameter value when updating to a file's time stamp(s) to the current time.
parent 01cf3f87
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment