Permission Denied In Creating A Directory - mkdir()

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Permission Denied In Creating A Directory - mkdir()

whistle
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.

 

 

 


Reply

Klass
do you have execute permission set on the script/directory your running the script from?

Reply

whistle
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.

Reply

Klass
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

Reply

Hercco
I tested and there is no problem using php mkdir at panda, so its definitely your file permissions.

Reply

whistle
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.

Reply

iGuest
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

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. php5 permission denied exec - 10.65 hr back. (1)
  2. upload and create directory php script - 31.90 hr back. (1)
  3. php exec permission denied - 34.33 hr back. (1)
  4. mkdir php permission - 38.12 hr back. (1)
  5. mkdir permission denied php - 38.49 hr back. (1)
  6. permission denied creating dir php - 51.88 hr back. (1)
  7. php mkdir promission denied - 55.39 hr back. (1)
  8. lycos ftp permission denied - 80.28 hr back. (1)
  9. public_html permission denied - 82.22 hr back. (1)
  10. php: permission denied - 83.91 hr back. (1)
  11. synology permission denied creating directory - 90.12 hr back. (1)
  12. php script delete files permission chmod error - 99.99 hr back. (1)
  13. php mkdir permission denied - 38.02 hr back. (5)
  14. php create file "permission denied" windows - 107.49 hr back. (1)
Similar Topics

Keywords : permission, denied, creating, directory, mkdir

  1. Unofficial Astahosted Members Directory
    (60)
  2. Login Script
    PHP Help #3 - Need help creating one (5)
    It turns out that the authentication script that I copied from
    http://www.php-mysql-tutorial.com/user-aut...on/database.php doesn't work even when it is left
    unchanged. What a crappy piece of code. Now I am trying to build by own login script from scratch.
    I already have a little knowledge on how to do this (connecting, echoing, retrieving) but I need
    some more examples and/or tips. I know what I need and maybe this could help you out: Note: Green
    items are fixed. No duplicate username in MySQL Database Authorized users only. I have to
    authorize each....
  3. Xgrid With Php
    Creating a script to post a blender file to Xgrid using PHP (0)
    I am doing pre planning for the blenderxgrid.com script. I was originally going to do this with
    PERL, but elected against it. Eventually I'll be moving the site off astahost and replacing it
    with a website hosted on the same machine as the xgrid controller. I am setting up a test version
    on my latop using OSX's apache server, MySQL, and PHP on a localhost config. Here is my step
    list for the script: ------------------------------------- Form: (within Xoops CMS, so user will
    have to be logged in) Username Password (where they can upload the .blend file....
  4. Help: Php + GD - Creating A Progress Bar
    Creating A Progress Bar (5)
    I've recently been trying to read up on using PHP and GD to create PNG's on the fly.
    I've been doing so in hopes that I will be able to learn how to compile a script that will
    output an image of a progress bar with certain attributes based on the url that called it (which
    will be accessed predominately from a forum, so it must be able to be coded as standard BBC). These
    attributes would include the bar's title (based on the event mentioned in the url) printed
    centered and right above the meter, a background image (to hold the meter), the meter (the ....
  5. How Do I Create And Write To Files?
    creating, writing, deleting files (4)
    Hi, Can someone please tell me how to create files and write to them in PHP. I just want to create
    a simple file containing text, and then be able to read it or update it. Thanks Alfie....
  6. Free software for creating PHP sites
    (17)
    This is good for those who doesnt have knowledge bout PHP they are totally free here are my 2 know
    free web portal system Postnuke -> www.postnuke.com and PHPnuke -> www.phpnuke.org /tongue.gif'
    border='0' style='vertical-align:middle' alt='tongue.gif' /> ....

    1. Looking for permission, denied, creating, directory, mkdir

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for permission, denied, creating, directory, mkdir
advertisement




Permission Denied In Creating A Directory - mkdir()



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE