0

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.

terdon
  • 242,166

1 Answers1

2

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