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

This topic:

My Netgear ReadyNAS duo (it's a Debian box) is running PHP.

I wrote a script for organizing some files. I succesfully read them from a directory /c/DIR1

Then I have to copy some of them into /c/DIR2

I get an error: Warning: mkdir() [function.mkdir]: Permission denied in /c/website/Organizer.php on line XXX

My "/" structure:

-rw------- 1 root root 7168 Jun 10 10:38

-rw------- 1 root root 8192 Jun 10 10:38 aquota.user

drwxr-xr-x 4 admin admin 16384 May 25 09:57 home

drwxrwxrwx 3 admin admin 16384 Jun 9 17:29 DIR2

drwx------ 2 admin admin 16384 May 10 16:33 lost+found

drwxrwxrwx 3 admin admin 16384 Jun 9 14:52 DIR1

drwxrwxrwx 5 admin admin 16384 Jun 10 10:40 website

Obviously, running the organizer script command-line works.

What permissions do I have to set to my folders for making them 'more' writable by web-php?

share|improve this question
up vote 0 down vote accepted

I don't think the folder permissions are the issue here. Try looking at the group; maybe your web-php doesn't have write permissions because of its group.

share|improve this answer
The group was ok. My scripts run in /c/website. Accessing in write mode to /c/DIR2 did result in permission denied. Using ../DIR2 makes everything works. Not sure about the reason but that's ok! – Fabio B. Jun 10 '11 at 14:37

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.