3

Is there an ideal chmod for /tmp (with /var/tmp symlinked to /tmp)?

I've seen people mention it both ways just curious as to the difference.

Is it a security difference?

7

Setting it to 1 sets the sticky bit. Setting it to octal 3 is actually setting octal 2, which is setting the setgid bit, and setting octal 1, the sticky bit.

When the setgid bit is set on a directory all files (or directories) created in that directory will belong to the group that owns the directory. When the sticky bit is set only the owner and root can delete it.

The norm for /tmp is 1777.

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.