ubuntu 12.04下改变文件权限

       最近在用ubuntu来学习nginx ,因为默认是用普通帐号登录的,所以并不能对文件系统中的文件进行很好的增删改,因此就需要对文件进行权限赋值。

 

所用命令:chown

root@ubuntu:/usr# ls -l
总用量 144
drwxr-xr-x 2 root root 36864 9月 12 23:51 bin
drwxr-xr-x 2 root root 4096 8月 29 01:07 games
drwxr-xr-x 46 root root 16384 9月 5 23:20 include
drwxr-xr-x 179 root root 36864 9月 7 00:06 lib
drwxr-xr-x 10 root root 4096 4月 23 2012 local
drwx------ 2 root root 16384 8月 27 23:36 lost+found
drwxr-xr-x 2 root root 4096 9月 14 17:18 nginx
drwxr-xr-x 2 root root 12288 9月 14 16:52 sbin
drwxr-xr-x 285 root root 12288 9月 6 23:38 share
drwxr-xr-x 9 root root 4096 9月 6 23:30 src
root@ubuntu:/usr# chown user nginx
root@ubuntu:/usr# ls
bin games include lib local lost+found nginx sbin share src
root@ubuntu:/usr# cd nginx
root@ubuntu:/usr/nginx# ls
nginx-1.5.4
root@ubuntu:/usr/nginx# ls -l
总用量 4
drwxr-xr-x 8 user user 4096 8月 27 21:37 nginx-1.5.4

就这么简单,nginx文件夹的文件就可以随便的增删改了...

posted @ 2013-09-14 17:37  lvailing  阅读(356)  评论(0)    收藏  举报