Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Angry 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.

    drwxrws--T+ 5  root  groupw  testdir/
    # file: testdir/
    # owner: root
    # group: groupw
    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.

    How can I make the sticky bit set to new files and directories that are created?

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts