当前位置: 代码迷 >> 综合 >> deepin中的chmod 2个选项的小坑记录
  详细解决方案

deepin中的chmod 2个选项的小坑记录

热度:19   发布时间:2024-01-17 06:05:28.0

背景:

1. 在deepin中练习  chmod xxxx myfile 时, xxxx 需要同时更改属主(u)和其它用户组的权限。 

2. 用了chmod u+x o-w myfile, 不成功;

3. 用了 chmod u+x, o-w myfile, 也不成功(小坑在这里);

 

解决:

出去上述  “3. ....”中 o-w前面的空格。:-)

在上述 “3. 用了 chmod u+x, o-w myfile中,o-w 前面,逗号之后,有个空格。它使得上述命令无法执行。

区别:

chmod u+x, o-w myfile (x)

chmod u+x,o-w myfile (v)