I'm having trouble with my webserver an noticed that the output of ls -la /var/www
contains irregularily ?
instead of permission digits, e.g.
$ LANGUAGE=C ls -la /var/www/
ls: cannot access /var/www/dokuwiki: Permission denied
ls: cannot access /var/www/joomla: Permission denied
ls: cannot access /var/www/..: Permission denied
ls: cannot access /var/www/index.html: Permission denied
ls: cannot access /var/www/mediawiki: Permission denied
ls: cannot access /var/www/html: Permission denied
ls: cannot access /var/www/postfixadmin: Permission denied
ls: cannot access /var/www/awffull: Permission denied
ls: cannot access /var/www/index.lighttpd.html: Permission denied
ls: cannot access /var/www/drupal: Permission denied
ls: cannot access /var/www/sarg: Permission denied
ls: cannot access /var/www/.: Permission denied
ls: cannot access /var/www/trac: Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
d????????? ? ? ? ? ? awffull
d????????? ? ? ? ? ? dokuwiki
d????????? ? ? ? ? ? drupal
d????????? ? ? ? ? ? html
-????????? ? ? ? ? ? index.html
-????????? ? ? ? ? ? index.lighttpd.html
d????????? ? ? ? ? ? joomla
d????????? ? ? ? ? ? mediawiki
d????????? ? ? ? ? ? postfixadmin
d????????? ? ? ? ? ? sarg
d????????? ? ? ? ? ? trac
sudo ls -la /var/www
produces
$ sudo ls -la /var/www/
insgesamt 52
drwxr--r-- 11 www-data www-data 4096 Mai 17 23:37 .
drwxr-xr-x 15 root root 4096 Apr 27 14:51 ..
drw-r--r-- 2 www-data www-data 4096 Mai 12 15:34 awffull
drwxr-xr-x 2 www-data www-data 4096 Apr 21 23:55 dokuwiki
drwxr-xr-x 2 www-data www-data 4096 Apr 21 23:55 drupal
drw-r--r-- 2 www-data www-data 4096 Apr 3 14:21 html
-rw-r--r-- 1 www-data www-data 177 Apr 21 23:54 index.html
-rw-r--r-- 1 www-data www-data 3568 Mai 1 11:13 index.lighttpd.html
drwxr-xr-x 2 www-data www-data 4096 Apr 21 23:55 joomla
drwxr-xr-x 2 www-data www-data 4096 Apr 27 18:58 mediawiki
drwxr-xr-x 2 www-data www-data 4096 Apr 21 23:55 postfixadmin
drw-r--r-- 2 www-data www-data 4096 Mai 12 15:05 sarg
drwxr-xr-x 2 www-data www-data 4096 Apr 21 23:55 trac
which corresponds to the result of my chmod
and chown
invokations (after the problem occured). The directories dokuwiki, drupal, joomla, mediawiki trac are mount points (options rw,bind
) of another partitions. I invoked ls
with both mounted and unmounted directories. Everything worked like a charm on Ubuntu 13.10.
LANGUAGE=C ls -la
). I would recommend a backup, unmount, and fsck the filesystem (in that order). – Rmano May 17 '14 at 22:02drwxr--r--
permissions on the top level/var/www/
directory i.e. others are allowed to read but not execute the directory. Execute permission is needed to stat the directory contents. – steeldriver May 17 '14 at 22:31LANGUAGE=C ls -la
command: see http://askubuntu.com/questions/473402/how-to-invoke-a-kde-application-with-another-language-equivalent-of-language-c/473456?noredirect=1#473456 – Kalle Richter May 28 '14 at 14:43