2

Currently trying to create this:

  • Owner: Read/write/execute
  • Group: Read/write/execute
  • other: Read/write/execute

I understand the chmod # is 777, however is there some way to prevent the "other" class from being able to delete? And would this change the chmod #? And if it does what is the #?

3

If you mean "delete files created by other people" then you want the sticky bit on the directory.

This is commonly seen on directories such as /tmp:

% ls -ld /tmp
drwxrwxrwt 15 root root 36864 Apr  7 21:46 /tmp

That "t" at the end means the directory is "sticky" and people can only delete their own files. So userA could put a file there; userB can put a file there. But userA can not delete userB's file. People can still delete and modify their own files, but they can't change other people's files.

To set that flag you want permission 1777 (chmod 1777 dir).

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.