localhost permissions (chmod) problem after moving to a new computer
Background: I just moved all my localhost xampp files over to a brand new formatted computer, and now its having permissions issues.
So my code is faulting with this error:
Warning: chmod() [function.chmod]: Operation not permitted in /Applications/XAMPP/xamppfiles/htdocs/mysite.php on line 109. Where line 109 of my code is: chmod(image.jpg, 0777);
Here's what I tried:
I went into terminal and typed:
chmod -R 777 /applications/xampp
And that appeared to work fine (all the folders within xampp had the read & write permissions)... but I think the problem may have to do something with "chown". Because on my original computer, when I go to "get info" on the xampp folder I see: Home (Me), staff, everyone
But on the new computer I see: system, admin, everyone... So I am thinking that may be my issue? Is there something I have to change in my .ini files?
Any ideas? It's driving me nuts!
Use chown to set the owner to the user that Apache is running as.
how do I know what xampp is "running as"?
and what exactly would I type in at terminal to change chown... I am new at using terminal! Thanks so much.
I take it this is xampp for Linux (as chmod/chown would be nonsensical on windows)
To find the user just issue, as root,
Thank you Leslie... it was a chown issue...
I ended up using the following after opening terminal as root (which I believe is the same thing you were telling me to do Leslie):
Permissions (to change ownership):
sudo chown -R nobody:admin /Applications/XAMPP/xamppfiles/htdocs
and then entered:
sudo chown -R nobody:admin /Applications/XAMPP/xamppfiles/var
Permissions (to change access level):
sudo chmod -R 777 /Applications/XAMPP/xamppfiles/htdocs
This ended up working.
|All times are GMT +1. The time now is 02:37 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.