Linux File and Directory permission - rwxst
文件权限
r:可读,可以使用cat命令查看文件内容;
w:可写,可以编辑或删除文件;
x:可执行,可以当作命令提交给内核
目录权限
r:可以对此目录执行ls,列出内部所有文件
w:可以在此目录创建文件
x:可以使用cd命令切换进此目录,也可以使用ls -l查看内部文件的详细信息
特殊权限
chmod u+s xxx # 设置setuid权限
chmod g+s xxx # 设置setgid权限
chmod o+t xxx # 设置stick bit权限,针对目录
chmod 4775 xxx # 设置setuid权限
chmod 2775 xxx # 设置setgid权限
chmod 1775 xxx # 设置stick bit权限,针对目录
Disclaimer
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here
Try iOS App