You are not logged in.
Pages: 1
Hi,
Since few days, I have trouble with my /tmp rights.
Indeed, I cannot modify a text file if I'm not the owner of the file, even if I'm the root user.
Let me explain :
As root user I create a file :
[root@archmachine ~]# touch /tmp/toto
I change the file owner :
[root@archmachine ~]# chown 1000:1000 /tmp/toto
As root, I try to add text, but it fails :
[root@archmachine ~]# echo "toto" >> /tmp/toto
-bash: /tmp/toto: Permission denied
mount result :
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=4194304k)
It works, if I change the owner of the file before trying to modify :
[root@archmachine ~]# chown root:root /tmp/toto
ls :
-rw-r--r-- 1 user user 0 24 févr. 18:01 /tmp/toto
rm works :
[root@archmachine ~]# rm /tmp/toto
Does anyone have an idea?
Thanks in advance!
Last edited by SuperDuck (2019-02-24 17:23:07)
Offline
Offline
Well done Loqs, indeed it works :
Check my fs.protected_regular parameter :
[root@archmachine ~]# sysctl fs.protected_regular
fs.protected_fifos = 1
Disable it :
[root@archmachine ~]# sysctl -w fs.protected_regular=0
Try it :
[root@archmachine ~]# echo "toto" >> /tmp/toto
It worked perfectly, thanks!
Last edited by SuperDuck (2019-02-24 17:25:16)
Offline
Pages: 1