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.