Results 1 to 8 of 8

Thread: Parent dir owner set to www-data, php mkdir still not working...

  1. #1
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Parent dir owner set to www-data, php mkdir still not working...

    Hello all, I'm running php5 on a xampp server and I'm getting a permission denied error when I try to use mkdir(). For example, if the script using mkdir() is in /opt/lammp/htdocs/mainFolder/callingFolder

    And the location it's attempting to create a new directory is:
    /opt/lammp/htdocs/mainFolder/secFolder/thirdFolder

    and lampp, callingFolder, mainFolder, htdocs, secFolder, and thirdFolder all have ownerships set to www-data with create/delete privileges. Do I need to set opt to be owned by www-data? that seems wrong, but what else?

  2. #2
    Join Date
    Jan 2007
    Location
    Netherlands
    Beans
    76
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Parent dir owner set to www-data, php mkdir still not working...

    What happens when to become www-data (su - www-data) and try to create the directory manualy?
    Registered Linux user #428992

  3. #3
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Re: Parent dir owner set to www-data, php mkdir still not working...

    I get an authentication error after entering my password. Where would I find/set/change the password for www-data?

  4. #4
    Join Date
    Jan 2007
    Location
    Netherlands
    Beans
    76
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Parent dir owner set to www-data, php mkdir still not working...

    First become the root user, then type "su - www-data".
    Then you don't need a password.
    Registered Linux user #428992

  5. #5
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Re: Parent dir owner set to www-data, php mkdir still not working...

    I set a password for www-data (using bernied's instructions from this post: http://ubuntuforums.org/showthread.php?t=330058 ). Then when I tried su - www-data it adds the user and set www-data as current user. From there I can mkdir no problem...
    Last edited by woodsonoversoul; September 30th, 2009 at 06:26 PM.

  6. #6
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Re: Parent dir owner set to www-data, php mkdir still not working...

    Tried to delete this post but can't find the option
    Last edited by woodsonoversoul; September 30th, 2009 at 06:28 PM.

  7. #7
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Re: Parent dir owner set to www-data, php mkdir still not working...

    Anyone else have an idea why I keep getting permission denied errors?

  8. #8
    Join Date
    Mar 2007
    Location
    Murfreesboro, TN
    Beans
    388
    Distro
    Ubuntu

    Re: Parent dir owner set to www-data, php mkdir still not working...

    Bump for the day crew...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •