issues
search
LingYanSi
/
blog
博客
https://github.com/LingYanSi/blog/issues
9
stars
0
forks
source link
linux file
#130
Open
LingYanSi
opened
3 years ago
LingYanSi
commented
3 years ago
如果文件夹拥有者为 root,至少赋予其 d --- --- rwx (即 007)的权限,才可以被普通用户读、写、执行。
如果文件夹拥有者为 root,其权限为 001,则只能对其进行执行操作,比如 cd 到这个目录(文件夹)里,但是进入后不能进行任何操作,比如:执行 ls 命令会报 ls: 无法打开目录’.’: 权限不够, 执行 vim 写文件会报 无法打开并写入文件。
如果文件夹拥有者为普通用户,至少赋予其 d r-x --- --- (即 500)的权限,才可以被普通用户写、执行(500权限可以 cd 到其文件夹下,执行 ls 操作,但是无法写入)。
如果文件夹拥有者为普通用户,其权限为 100,则可以对其进行 cd 操作,但是进入到此文件夹下无法执行 ls (读)操作,亦无法对其进行写操作。
chmod 007 file/path