0

I follow a tutorial to secure my /etc/fstab file. This is a certain part about /var and /tmp

UUID=XXXX-XXXX-XXXX /var ext4 defaults,nodev,nosuid,noexec 1 2
UUID=ZZZZ-ZZZZ-ZZZZ /tmp ext4 defaults,nodev,nosuid,noexec 1 2

I executed the following commands to test the configuration :

touch /tmp/testFile
chmod u+s /tmp/testFile

I was expecting an error message but nothing... Is it normal ? Is it dangerous ?

  • 1
    Did you check with ls /tmp/testFile if you have SUID on file? – Romeo Ninov Jan 8 at 14:48
1

nosuid doesn’t prevent setting the bits; it means that they don’t have any effect. (That way, previously-set bits are also rendered ineffective.)

Setting the bits is only dangerous if the file system is later mounted without nosuid; but if anyone has sufficient access to set those bits on your file system, you’ve lost anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.