Answer the question
In order to leave comments, you need to log in
Can't delete a folder that I own?
Why can't I delete the folder I own? I created the fff folder from sudo, made my own account A, set the rights to 700. Now I try to delete the fff folder under user A, writes permission denied. Although if user A creates a ddd folder with rights 700, he can delete it. But if you change the owner to the ddd folder and set permissions to 700, then user A can still delete this folder with a different owner. So, where is the distinction here?
Answer the question
In order to leave comments, you need to log in
To delete a file or directory, you must have full rights to the parent directory.
Privileges on a directory give permission to do something inside the directory, but not on the directory itself.
The folder may not be deleted, for example, because it is open in another process.
In general, everything works the opposite of how you describe.
Conduct a real experiment and make sure that there is a distinction between rights.
If you create a subdirectory fff as root in user A's directory (/home/A). Then, do
sudo chmod 0700 /home/A/fff
sudo chown A:A /home/A/fff
create directory, delete directory, create file, delete file - write permission to the parent directory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question