Files
chill_notes/Lunix/Ubuntu/更改所有子文件和子目录所有者权限.md
2026-04-16 00:28:41 +08:00

19 lines
1022 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
有两个修改命令可以用到「change mode」&「change owner」
==即chmod以及chown其中可以用递归参数====-R====来实现更改所有子文件和子目录的权限。==
==1、利用chmod修改权限==
==对Document/目录下的所有子文件与子目录执行相同的权限变更:==
==chmod -R 700 Document/==
==-R参数是递归 处理目录下的所有文件以及子文件夹==
700是变更后的权限表示只有所有者有读和写以及执行的权限
Document/ 是需要执行的目录
==2、利用chown改变所有者==
==对Document/ 目录下的所有文件与子目录执行相同的所有者变更修改所有者为users用户组的username用户==
==chown -R username:users Document/==
==username:users users用户组的username用户组参数不是必须有==
==参考http://rabbit52.com/2011/linux/ubuntu/linux-chmod-chown==
> 来自 <[http://blog.csdn.net/songyu0120/article/details/43408499](http://blog.csdn.net/songyu0120/article/details/43408499)>