mkdir isn't working on the host?

Discussion in 'PHP' started by mahmood, May 10, 2006.

  1. #1
    I have just realized that I can't create a folder on the host using mkdir. The code works fine on my localhost.


    Any idea? I guess it might be something with setting of the host to prevent users from creating a directory.
     
    mahmood, May 10, 2006 IP
  2. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Make sure to chmod the parent directory. You can use a FTP program to chmod. Maybe you have to chmod to 777.
     
    goldensea80, May 10, 2006 IP
  3. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks it worked. Isn't it a security problem to make the parent 777?
     
    mahmood, May 10, 2006 IP
  4. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #4
    when you say parent directory, are you referring to the public_html directory? if so, i personally would not make it 0777, for security reasons, 0755 is acceptable.

    and i can mkdir no problem
     
    sawz, May 10, 2006 IP
  5. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #5
    Right. But some time 755 didn't work for me.
     
    goldensea80, May 10, 2006 IP
  6. sawz

    sawz Prominent Member

    Messages:
    8,225
    Likes Received:
    808
    Best Answers:
    0
    Trophy Points:
    360
    #6
    use caution.

    these are my permissions:
    folders 0755
    php htm txt 0644
    config files 0600

    i am religious about this, even if a script tells me 0777 i won't, and if the script don't work on MY permissions, it hits the trash.:)

    this is my 10th post, sig time...:rolleyes:
     
    sawz, May 10, 2006 IP