首页 > 其他 > 详细

文件权限与目录配置练习

时间:2016-01-03 02:42:08      阅读:204      评论:0      收藏:0      [点我收藏+]
[root@localhost ~]# chgrp users intstll.log
chgrp: 无法访问 “intstll.log”: 没有那个文件或目录
[root@localhost ~]# chgrp users install.log
[root@localhost ~]# ls -l
总计 44
-rw------- 1 root root    827 09-13 00:57 anaconda-ks.cfg
-rw-r--r-- 1 root users 14056 09-13 00:57 install.log
-rw-r--r-- 1 root root   3058 09-13 00:57 install.log.syslog
-rw-r--r-- 1 root root     20 09-18 17:11 trest.txt
[root@localhost ~]# chgrp testing install.log
chgrp: 无效的组 “testing”
[root@localhost ~]# chown bin install.log
[root@localhost ~]# ls -l
总计 44
-rw------- 1 root root    827 09-13 00:57 anaconda-ks.cfg
-rw-r--r-- 1 bin  users 14056 09-13 00:57 install.log
-rw-r--r-- 1 root root   3058 09-13 00:57 install.log.syslog
-rw-r--r-- 1 root root     20 09-18 17:11 trest.txt
[root@localhost ~]# chown root:root install.log
[root@localhost ~]# ls -l
总计 44
-rw------- 1 root root   827 09-13 00:57 anaconda-ks.cfg
-rw-r--r-- 1 root root 14056 09-13 00:57 install.log
-rw-r--r-- 1 root root  3058 09-13 00:57 install.log.syslog
-rw-r--r-- 1 root root    20 09-18 17:11 trest.txt
[root@localhost ~]# ls -al .bashrc
-rw-r--r-- 1 root root 176 2007-01-06 .bashrc
[root@localhost ~]# chmod 777 .bashrc
[root@localhost ~]# ls -al .bashrc
-rwxrwxrwx 1 root root 176 2007-01-06 .bashrc
[root@localhost ~]# chmod u=rwx,go=rx .bashrc
[root@localhost ~]# ls -al .bashrc
-rwxr-xr-x 1 root root 176 2007-01-06 .bashrc
[root@localhost ~]# chmod a+w .bashrc
[root@localhost ~]# ls -al .bashrc
-rwxrwxrwx 1 root root 176 2007-01-06 .bashrc
[root@localhost ~]# chmod a-w .bashrc
You have mail in /var/spool/mail/root
[root@localhost ~]# chmod a-x .bashrc
[root@localhost ~]# ls -al .bashrc
-r--r--r-- 1 root root 176 2007-01-06 .bashrc
[root@localhost ~]#

 

文件权限与目录配置练习

原文:http://www.cnblogs.com/cphome/p/5095688.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!