6

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?

1 Answer 1

11

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .