chmod a+x的含义

发布时间 2023-04-03 20:52:03作者: 郭慕荣

u 表示用户
g 表示用户组
o 表示其它
a 表示所有

chmod a+x a.txt 等价于 chmod +x a.txt
给所有用户给予a.txt文件可执行权限
chmod u+x a.txt
a.txt文件的所有用户可执行权限
chmod g+x a.txt
a.txt用户组可执行权限
chmod o+x a.txt
a.txt其他用户可执行权限

chmod是添加更改权限命令
a是指所有的用户组,包括root用户组,文件拥有者的用户组,还有其他用户组。
+x是指添加执行权限。
+x是执行权限,+r是阅读权限,+w是写入权限