Results 1 to 2 of 2
I have created a directory where I need multiple users to access. Some users need to be able to create and write but not delete and other users files and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-23-2010 #1Just Joined!
- Join Date
- Mar 2009
- Posts
- 8
Sticky Bit for new files
I have created a directory where I need multiple users to access. Some users need to be able to create and write but not delete and other users files and have some users that only need to be able to read and not write.
I have created two groups one called groupw (write) and one called groupr (read) and I have used setfacl to set the groups and permissions.
The problem i'm having is if a user from groupw creates a new direcotry it does not retain the sticky bit so then any other user in the groupw would be able to delete another user's file.Code:drwxrws--T+ 5 root groupw testdir/ # file: testdir/ # owner: root # group: groupw user::rwx group::rwx group:groupr:r-x mask::rwx other::--- default:user::rwx default:group::rwx default:group:groupr:r-x default:mask::rwx default:other::---
How can I make the sticky bit set to new files and directories that are created?
- 06-28-2010 #2Just Joined!
- Join Date
- Mar 2009
- Posts
- 8
I read the manual for umask but it seems to suggest that it's used for removing or masking out the defualt permissions set to it during creation.
I tried changing the umask anyway but I don't think the umask will force a sticky bit to be set. If I would set the umask to say 1022 would that not prevent a sticky bit? However trying to specify four octets results in the following message:
umask 1022
-bash: umask: 1022: octal number out of range


Reply With Quote
