问题
I downloaded CakePHP and put it in my www directory. I enabled mod-rewrite and all that and changed my document root. But I still get permission denied errors in my apache error log because Cake can't require
the files from other directories. It's almost as if I need to chmod every single directory to 777
in order to make this work. I know that's not right but can someone tell me if I did not install it correctly or what to CHMOD. Because so far it's literally every folder I'm going through CHMODing right now.
回答1:
Try
chown -R <webserver_user> <cake_dir> #set the owner of your cake dir recursively to your webserver
chmod -R 755 <cake_dir> #set the permissions recursively
you can get the webserver user with
ps -aux | grep apache #or whatever your web server is
来源:https://stackoverflow.com/questions/7179537/cakephp-chmod-question