PDA

View Full Version : [ubuntu] Parent dir owner set to www-data, php mkdir still not working...


woodsonoversoul
September 29th, 2009, 09:23 AM
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?

CyberJack
September 29th, 2009, 10:12 AM
What happens when to become www-data (su - www-data) and try to create the directory manualy?

woodsonoversoul
September 29th, 2009, 03:40 PM
I get an authentication error after entering my password. Where would I find/set/change the password for www-data?

CyberJack
September 30th, 2009, 03:03 AM
First become the root user, then type "su - www-data".
Then you don't need a password.

woodsonoversoul
September 30th, 2009, 12:55 PM
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...

woodsonoversoul
September 30th, 2009, 01:01 PM
Tried to delete this post but can't find the option

woodsonoversoul
September 30th, 2009, 09:09 PM
Anyone else have an idea why I keep getting permission denied errors?

woodsonoversoul
October 1st, 2009, 09:50 AM
Bump for the day crew...