This question already has an answer here:

This should be an easy one... I have the following situation in my ubuntu server (ftpuser is not in the root group):

ftpuser$ ch /var/www/
ftpuser$ mkdir test
ftpuser$ chmod 775 test

now login with root user

root$ cd var/www/test
root$ touch a.txt
root$ chmod 644 a.txt

now login with ftpuser again

ftpuser$ cd /var/www/test
ftpuser$ rm a.txt

This works. And this is my question, why does this work? The file a.txt is created by root and has permission 644, so only root should be able delete it.

Or is everything in folder test now fully accessible by "ftpuser" user?

Thanks for the help.

marked as duplicate by steeldriver, terdon Mar 30 '16 at 11:09

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.


This happens because ftpuser has write access to var/www/test directory

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