It seems that Linux has tightened up security in /tmp in later kernels than 3.x and if
/tmp
has the sticky bit set another user may not modify a 0777
file.
Are there any work arounds for sharing a flock
'ed file? (I cannot create the file as root
ahead of time, which apparently would work since root
owns /tmp
)
$ ll /tmp/zzz
-rwxrwxrwx 1 games games 1 Aug 23 11:35 /tmp/zzz
$ id
uid=1000(me) gid=1000(me) groups=1000(me)
$ /usr/bin/flock /tmp/zzz ls
flock: cannot open lock file /tmp/zzz: Permission denied
Asked by rrauenza
(852 rep)
Aug 23, 2024, 06:39 PM
Last activity: Aug 23, 2024, 07:37 PM
Last activity: Aug 23, 2024, 07:37 PM