Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Permission Denied In Creating A Directory, mkdir()
whistle
post Aug 4 2005, 12:03 PM
Post #1


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 56
Joined: 18-July 05
Member No.: 7,201



QUOTE
Warning: mkdir(/home/whistle/public_html/see/seeto): Permission denied in /home/whistle/public_html/see/config.php on line 56


My web hosting is on the astahost. The absolute path of my php script is "(/home/whistle/public_html/see". When I try to create a directory named "seeto", the error message about permission denied is displayed. The same script I tried on another web hosting server "Lycos", it works perfectly.

Can anyone tell me what is wrong with it? Or anything I should notice more? Thanks.

CODE
<?php
if (mkdir("/home/whistle/public_html/see/seeto", "0777")) {
   printf("New directory created");
} else {
   printf("Couldn't create directory");
}
?>


That's my php script for testing the directory creation. Of course, the same error message is displaied as following:

Warning: mkdir(/home/whistle/public_html/see/seeto): Permission denied in /home/whistle/public_html/see/test.php on line 2
Couldn't create directory <=== This is not a part of the error message.
<=== It is my prompt message in the else block.

It seems that the php script does not get permission for create a directory or a file. What should I do to open the permission for my PHP scripts.
Go to the top of the page
 
+Quote Post
Klass
post Aug 4 2005, 12:59 PM
Post #2


Klassified
Group Icon

Group: Members
Posts: 156
Joined: 7-June 05
From: Klass-World
Member No.: 5,936



do you have execute permission set on the script/directory your running the script from?
Go to the top of the page
 
+Quote Post
whistle
post Aug 5 2005, 10:53 AM
Post #3


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 56
Joined: 18-July 05
Member No.: 7,201



QUOTE(Klass @ Aug 4 2005, 08:59 PM)
do you have execute permission set on the script/directory your running the script from?
*



Ah~~~ I don't wether I have the execute permission set on the script/directory or not.

The permission of the directory "/home/whistle/public_html/see" is 755. Is it right? But I don't know the permission of the directory "/home/whistle/public_html/see/seeto" I want to create, because it is never created. biggrin.gif Just joking.
Go to the top of the page
 
+Quote Post
Klass
post Aug 5 2005, 11:33 AM
Post #4


Klassified
Group Icon

Group: Members
Posts: 156
Joined: 7-June 05
From: Klass-World
Member No.: 5,936



why not make full permission on the see directory and the script that is running if it is not in the see directory.

if the script runs then you know it is a permission/chmod issue, if not maybe check the logs and see why
Go to the top of the page
 
+Quote Post
Hercco
post Aug 5 2005, 12:14 PM
Post #5


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



I tested and there is no problem using php mkdir at panda, so its definitely your file permissions.
Go to the top of the page
 
+Quote Post
whistle
post Aug 8 2005, 04:24 PM
Post #6


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 56
Joined: 18-July 05
Member No.: 7,201



QUOTE
why not make full permission on the see directory and the script that is running if it is not in the see directory.

if the script runs then you know it is a permission/chmod issue, if not maybe check the logs and see why


QUOTE(Hercco @ Aug 5 2005, 08:14 PM)
I tested and there is no problem using php mkdir at panda, so its definitely your file permissions.
*



Yes, you are right. After I made full permission, the mkdir worked. It means that the parent directionary should have the permission, at least full permission mush work.
Go to the top of the page
 
+Quote Post
iGuest
post Apr 7 2008, 09:15 PM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



able to upload to public_ftp but can\\
Permission Denied In Creating A Directory

I am able to upload my files on the servers public_ftp/incoming folder but am not able to open the same directory to read or download the files.The error which I'm getting is permission denied in /home/jahp/public_html/u_upload.Php I'm on linux hosting and the drive path I'm using is relative to the u_upload script.Is there any way I could change the permission of the directories.

Will be greatful if someone helps.

Thanku .





-reply by jahajee
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How Do I Create And Write To Files?(4)
  2. Xgrid With Php(0)
  3. Login Script(5)
  4. Unofficial Astahosted Members Directory(60)


 



- Lo-Fi Version Time is now: 22nd August 2008 - 02:54 AM