chmod 775在一个文件夹上,但不是该文件夹下的所有文件 [英] chmod 775 on a folder but not all files under that folder
本文介绍了chmod 775在一个文件夹上,但不是该文件夹下的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通过将775个用户权限分配给文件夹(项目),是否会影响文件夹下的文件权限?
by assigning 775 rights of user to a folder (project) does that impact the files permissions under the folder?
# chown -R root:user1 /var/www/project/
# chmod 775 -R /var/www/project/
意思是,如果 /project/config.html
曾经拥有664权利,这是否意味着664权利消失并授予775?
如何避免这种情况发生?在 / project /
下有具有不同权限的文件和文件夹,我不希望这些文件和文件夹被覆盖。
Meaning, if /project/config.html
used to have a 664 right does that mean that 664 right disappears and grants 775?
How to avoid this to happen? There are files and folders with different rights under /project/
and I do not want these to be overridden.
推荐答案
删除 -R
标记一个>。这意味着它也会更改子目录中的所有文件和文件夹。
Remove the -R
flag. That means it changes all files and folders in the subdirectory as well.
# chown root:user1 /var/www/project/
# chmod 775 /var/www/project/
这篇关于chmod 775在一个文件夹上,但不是该文件夹下的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文