开发者

chmod 755 for directories - does this allow everyone to delete the folder?

开发者 https://www.devze.com 2023-04-13 07:02 出处:网络
Does the \"execute\" bit a开发者_如何学JAVAlso mean \"deletion\" permissions, or do I need \"write\" permissions for that?To remove a directory, the parent of that directory must be writable by the ef

Does the "execute" bit a开发者_如何学JAVAlso mean "deletion" permissions, or do I need "write" permissions for that?


To remove a directory, the parent of that directory must be writable by the effective user. The write and execute flags of the directory being removed do not matter.

Additionally, one cannot remove a directory if it is not empty. Often a user will use the rm -r command to remove a non-empty directory tree recursively by first removing all its contents. If the user does not have write permission to the subdirectories, he/she cannot empty their contents first.


No, the 'execute' bit is used by directories to determine whether a 'user' can view the files listed in the directory. In regards to deletion the relevant bit is the 'write' permission bit of the parent directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消