Permission denied in /home/...

mbuljo

Verified User
Joined
Oct 31, 2011
Messages
8
Hello

I get this message :
Warning: mkdir() [function.mkdir]: Permission denied in /home/xx/domains/xx.net/public_html/makedir.php on line 4

and my php code is

1 <?php
2
3 // Create directory(folder) to hold each user's files(pics, MP3s, etc.)
4 mkdir("user/test", 0755);
5
6 ?>

and makedir.php have chmod 755

I also have another place the same file on a different domain and works perfectly.


Thanks for any help :)
 
Hello

I get this message :
Warning: mkdir() [function.mkdir]: Permission denied in /home/xx/domains/xx.net/public_html/makedir.php on line 4

and my php code is

1 <?php
2
3 // Create directory(folder) to hold each user's files(pics, MP3s, etc.)
4 mkdir("user/test", 0755);
5
6 ?>
Get the full address to mkdir

Code:
4 mkdir("/home/xx/domains/xx.net/public_html/", 0755);
also my be your server admin prohibit the creation access, contact to your data center.
 
I'm a bit lost in understanding this. Are you running the php program from the 'net? As the site user?

And what do you mean by to hold each user's files?

Do you mean other sites' users, or users set up for this site? What is the real full path of the file you're trying to create? Is it in a different DirectAdmin user for different sites? If so, then of course you'll get permission denied; if you didn't anyone could change all the sites on your server.

If I'm missing something, then please explain more fully.

Thanks.

Jeff
 
Back
Top