Permission denied for mkdir?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pyromaster114
Forum Newbie
Posts: 19
Joined: Fri Mar 14, 2008 8:12 pm

Permission denied for mkdir?

Post by pyromaster114 »

I have a script that is supposed to create a bunch of directories and stuff... but I get permission errors when it runs... I changed the parent directory permission to 777 even and it STILL gives me an error...
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: Permission denied for mkdir?

Post by hawleyjr »

Are you trying to write the directories above or below the document root?
pyromaster114
Forum Newbie
Posts: 19
Joined: Fri Mar 14, 2008 8:12 pm

Re: Permission denied for mkdir?

Post by pyromaster114 »

Well... technically... both... i guess...
The directory tree looks like this:
/root/
|
|-/admin/
| |
| |-script.php
|
|-/projects/
| |
| |-<directories being created go here>
|
|-otherstuff.php
|
|-etc

So yeah... I'm not sure if that counts as above or below...
I also tried a simple script to check something... i just told it to make a directory on the level of the script...

/root/
|
|-Script.php
|-/newfolder/

that didn't work either...
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: Permission denied for mkdir?

Post by hawleyjr »

Is this on a server you manage or a shared server you lease?
pyromaster114
Forum Newbie
Posts: 19
Joined: Fri Mar 14, 2008 8:12 pm

Re: Permission denied for mkdir?

Post by pyromaster114 »

A shared, leased server.
The scripts work on all the servers I manage... but not the server I'm trying to put it on...
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Re: Permission denied for mkdir?

Post by hawleyjr »

pyromaster114 wrote:A shared, leased server.
The scripts work on all the servers I manage... but not the server I'm trying to put it on...

This may be due to an anal admin who is managing the shared server.

More Information:

http://us2.php.net/features.safe-mode
Post Reply