Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a basic question about file permission on Linux.

I would like to have my file to be deletable by all users/all groups on a machine.

At the moment I have a specific user user_A that creates a file with permission 0666, but if another user user_B tries to delete that file Linux doesn't allow that and says no permisison.

Which numeric value should I use?

Regards

AFG

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

In traditional Unix/Linux permissions, give that user write access to the directory containing the file. A person can delete any file in a directory to which they have write access.

To grant everybody permission to delete any file in a directory (and also to create files there)

chmod o+w directoryname

For finer grained controls use ACLs as described by RedHat, Ubuntu and others.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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