Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
root@SERVER:~# cat /etc/passwd | grep www-data

root@SERVER:~# ls -al /cluster/www/html/tmp/reportexport_274.xml
-rwxrwxrwx 1 www-data www-data 908 2011-03-30 14:03 /cluster/www/html/tmp/reportexport_274.xml

root@SERVER:~# sudo -u www-data cat /cluster/www/html/tmp/reportexport_274.xml
cat: /cluster/www/html/tmp/reportexport_274.xml: Permission denied

The directory is an nfs mount:

x:/cluster/www /cluster/www nfs _netdev,rw,soft,intr,rsize=32768,wsize=32768,nosuid,nodev,noatime,timeo=15 0 0

Linux x 2.6.32-31-server #61-Ubuntu SMP Fri Apr 8 19:44:42 UTC 2011 x86_64 GNU/Linux

How can this be? am I missing something?

share|improve this question

How about sudo -u www-data ls -l /cluster/www/html/tmp/? Perhaps www-data is missing permissions to reach the directory entry. If that's the case chown/chmod each directory up to tmp so they are readable/executable by www-data.

share|improve this answer
sudo -u www-data ls -l /cluster/www/html/tmp/*.xml ls: cannot access /cluster/www/html/tmp/export_274.xml: Permission denied – Fivetide May 10 '11 at 12:52
@user80973: do sudo -u www-data ls -ld /cluster/www/html/tmp, sudo -u www-data ls -ld /cluster/www/html, etc. until it doesn't result in an error or you get to /cluster. You have to change the permissions in the directories giving permission errors by using chmod a+rx /path/to/dir. At the very least you'll probably have to execute chmod a+rx /cluster/www/html/tmp. – Eduardo Ivanec May 10 '11 at 12:55
yeh it was missing the lack of +x . :) – Fivetide May 10 '11 at 12:58

Check that the directories in the path all in some manner allow user www-data read and execute permission.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.