Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    United Kingdom

    Question Non-deleteable directories?!

    Is it possible to create a directory that the user can write files to, delete files from etc, but cannot delete the actual directory?

    I have tried various chmod and chown commands, but I can always delete the folder.

    Any ideas?

  2. #2
    A directory is just a file in it's parents directory. So if you want /home/user to not be deletable the user shouldn't have write permission in /home. They can create and delete files/directories under /home/user but can't delete /home/user itself.

    If you want to have /home/user/web where they can add and delete files in /home/user/ then they'll be able to remove /home/user/web. AFAIK there's no combination of permissions that would prevent that.

  3. #3
    Join Date
    Sep 2002
    man chflags
    GUI admin tools have no honor. It is a good day to vi.

  4. #4
    Join Date
    May 2001
    Use the sticky bit, and chmod the directory to 1775.

Posting Permissions

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