2

I have some directories and files that looks like this one

drwxr-xr-x. 2 ss ss 4096 Oct  3  2004 backup

Notice the . in the permissions.

The user ss can not delete this directory.

Question

How do I set such write protection and how do I undo it?

8

The . at the end of the permissions is probably not relevant here. It indicates ACLs and/or SElinux attributes apply. See this question for more details.

If the user ss cannot delete this directory it is probably because he does not have write permission on the parent dir of this backup dir.

Add write permission for user ss to the parent directory of the directory backup to allow removal.

Deleting a file or directory requires write directory to the parent directory because that is the file you are editing.

If user ss has write permissions on the parent directory and you are still unable to remove the directory check acls (using getfacl) and SELinux context (using ls -ldZ).

4
  • What does the . then mean? – Sandra Jun 2 '12 at 19:11
  • 1
    The . means there is an SELinux security context a + would indicate an extended ACl. – user9517 Jun 2 '12 at 19:32
  • SELinux is disabled. Could this still be a problem? – Sandra Jun 2 '12 at 19:38
  • 1
    @Sandra: try it, and let us know it it worked or not. If you are still unable to delete the directory update your question with the getfacl and ls -dZ output. – Bram Jun 2 '12 at 19:59
0
getfacl backup
ls -lZ

This will show you SELinux contex and ACL. Maybe this will help you.

Not the answer you're looking for? Browse other questions tagged or ask your own question.