首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux权限管理下令

2012-12-28 
linux权限管理命令chmod:change the permissions mode of a file,所在路径/bin/chmod,改变文件或目录权限

linux权限管理命令

chmod:change the permissions mode of a file,所在路径/bin/chmod,改变文件或目录权限
用法: chmod [{ugo}{+-=}{rwx}] [文件或目录] 或 chmod [mode=421] [文件或目录]
例: chmod u+wx file,chmod o-rw file,chmod g=rwx file ,chmod 777 file
文件目录权限总结:
代表字符????? 权限 ? ? ? ????? 对文件的含义???????????????????? ? ? ? ? ? ? ? ? ? ?? 对目录的含义
?? r????????????? ? ?? 读?? ? ?? 可以查看文件内容(cat,more,head等)??? ?? 可以列出目录中的内容(ls)
?? w????????????? ?? 写??? ??? 可以修改文件内容(echo,vi)?????????????????? ? ?? 可以在目录中创建、删除文件(touch,mkdir,rm)
?? x??????????? ???? 执行? ??? 可以执行文件(命令、脚本)????????? ? ? ? ? ? ? ? 可以进入目录(cd)
chown:change file ownership,所在目录/bin/chown,改变文件或目录的所有者
用法:chown [用户] [文件或目录]
例: chown nobody file
chgrp:change file group ownership,所在目录/bin/chgrp,改变文件或目录的所属组
用法: chgrp [用户组] [文件或目录]
例: chgrp adm file


热点排行