简体   繁体   English

chmod 755用于目录-这是否允许所有人删除文件夹?

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

“执行”位是否还意味着“删除”权限,或者我是否需要“写入”权限?

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. 要删除的目录的writeexecute标志无关紧要。

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. 通常,用户将使用rm -r命令通过先删除其所有内容来递归地删除非空目录树。 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. 关于删除,相关位是目录的“写”权限位。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM