Sample Header Ad - 728x90

How to share a writable flock file in /tmp/ between two users?

2 votes
1 answer
80 views
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