A question about directory permissions and rmdir GNU coreutils 8.23
When deleting a directory with rmdir should the permission check to see if a user does have permission do delete be based on the directory in question or the parent directory of the directory to be deleted?
For example in my home directory I have 3 subdirectories, user1, user2, and a newly created and empty foo and each directory has 750 permissions while home has 755 and is owned by root: user1 is owned by user1 user2 is owned by user2 foo is owned by root If I were to Code:
chown user2:user2 foo Code:
rmdir foo However if I were to move foo with root to my owned directory user1 and try: Code:
rmdir foo I can not tell if that is an error or working as normal. |
it works like this on my system, too.
i find it logical. |
All times are GMT -5. The time now is 02:39 PM. |