This question already has an answer here:

To delete a file in Linux:

What minimal permissions do we need to set on it?

What minimal permissions do we need to set on its parent directory?

marked as duplicate by Gilles 'SO- stop being evil' linux Jun 17 '14 at 21:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    you need write (+w) permissions, and parent directory should be accessible (+x) to the user which is you want to have delete permission. – Tejas Jun 17 '14 at 12:03
  • 3
    Permissions on the file itself don't matter. You need +wx on the parent directory. – doneal24 Jun 17 '14 at 12:28

If you try to delete a file then the normal file permissions (including ACL and RichACL) do not matter at all. The only relevant attribute to the file itself is the file system attribute immutable, see man lsattr, man chattr.

You need write permission for the direct parent directory and execute permission for all parent directories.

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