Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as off-topic by Magellan, Falcon Momot, mdpc, Ward, kce Oct 14 '13 at 0:32

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Falcon Momot, Ward, kce
  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Magellan, mdpc
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 7 down vote accepted

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

share|improve this answer
    
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. –  Iain 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
getfacl backup
ls -lZ

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

share|improve this answer

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