Answers:
默认权限/var
是755 = rwxr-xr-x
:所有人都可读且可执行(您需要目录),并且只能由root写入。
将文件或目录的权限设置为777永远是不正确的。就您而言,您应该
www-data
是应该将Web应用程序写入此目录,还是root
不能)?/var/www
Web应用程序的目录)。命令的结果:ls -l /var
在Fedora 17中:
drwxr-xr-x. 2 root root 4096 Jun 9 19:34 account
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 adm
drwxr-xr-x. 19 root root 4096 Jun 9 18:44 cache
drwxr-xr-x. 3 root root 4096 Jun 13 19:55 db
drwxr-xr-x. 3 root root 4096 Jun 9 19:34 empty
drwxr-xr-x. 3 root root 4096 Apr 26 18:58 ftp
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 games
drwxrwx--T. 2 root gdm 4096 Jun 9 03:35 gdm
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 gopher
drwxr-xr-x. 55 root root 4096 Jun 28 16:19 lib
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 local
lrwxrwxrwx. 1 root root 11 Jun 9 19:18 lock -> ../run/lock
drwxr-xr-x. 22 root root 4096 Jul 7 22:22 log
lrwxrwxrwx. 1 root root 10 Jun 9 19:18 mail -> spool/mail
drwxr-x---. 6 root named 4096 Jul 4 19:53 named
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 nis
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 opt
drwxr-xr-x. 2 root root 4096 Feb 3 13:58 preserve
lrwxrwxrwx. 1 root root 6 Jun 9 19:18 run -> ../run
drwxr-xr-x. 17 root root 4096 Jun 9 19:38 spool
drwxrwxrwt. 4 root root 4096 Jul 8 00:36 tmp
drwxr-xr-x. 8 root root 4096 Jun 9 19:34 www
drwxr-xr-x. 3 root root 4096 Jun 9 19:26 yp