Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Our server is a Linux Server with Debian 5, Apache2

This is a development server which we are doing testing on and as such we have setup world write permission on everything

Ive also set the umask in /etc/profile to 000

One particular PHP script loops through some images in a directory and attempts to make thumbnails in a sub directory

the PHP Error we receive is "Warning: mkdir() [function.mkdir]: No such file or directory"

apache2 runs as user www-data, I can login as www-data and make directories and files and everything with no problem

the apache error log just says File does not exist

Any suggestions?

share|improve this question
We have also increased the apache LogLevel to debug in httpd.conf – Tim Sep 1 '10 at 3:48
up vote 1 down vote accepted

Is the path its trying to create there ? ie if its trying to create /var/www/images/thumb/ then /var/www/images/ needs to exist. It may also pay to enable recursive creation mkdir(/var/www/images/thumbs, 0, true)

share|improve this answer
no the path doesnt exist. This works fine on 2 other servers, we dont want to change the code, but I will test to see if it works – Tim Sep 1 '10 at 4:00
I dont mean the final path that its trying to create i.e. if its trying to create thumbs within the directory /var/www/images then /var/www/images would have to exist before it tried to make thumbs – Geraint Jones Sep 1 '10 at 4:03

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.