@bornkiller
2014-08-12T06:20:24.000000Z
字数 771
阅读 3021
linux
[root@localhost static]# ls -aldrwxr-xr-x. 2 root root 4096 7月 24 13:34 .drwxr-xr-x. 5 root root 4096 7月 24 09:25 ..-rw-r--r--. 1 root root 1095 7月 24 13:34 default.conf-rw-r--r--. 1 root root 427 7月 24 09:31 example_ssl.conf-rw-r--r--. 1 root root 3957 7月 24 09:26 mime.types-rw-r--r--. 1 root root 643 7月 24 09:27 nginx.conf##信息依次为文件权限、连接数、文件持有用户、文件所属用户组、文件大小、时间信息
d代表目录,-代表文件。rwx显示,无则显示-。(r=2,w=3,x=4)-rw-r--r--. 1 root root 1095 7月 24 13:34 default.conf -,代表为文件。root用户权限rw-,可读可写不可执行。root用户组r--,只可读。other用户 r--,只可读。chgrp [-R] usergroup directory/filename
chown [-R] username:usergroup directory/filename
chmod [-R] 777 directory/filename使用数字表示权限chmod [-R] u=rwx,go=rw- directory/filename显式声明所有权限 