Getting my CakePHP instances working on Fedora 15

Written by James McDonald

October 3, 2011


I have unzipped the latest version of cakephp into /home/username/public_html/cakephp

I have baked an app:

cd /home/username/public_html/cakephp/cake/console

./cake bake -app /home/username/public_html/mapdb-dev

And then I hit the errors of access denied to the mapdb-dev/tmp directory even though it’s full access (777) for everyone

The problem is the SeLinux context

cd /home/username/public_html/mapdb-dev

ls -Z tmp/
drwxrwxrwx. username usergroup unconfined_u:object_r:httpd_user_content_t:s0 cache
drwxrwxrwx. username usergroup unconfined_u:object_r:httpd_user_content_t:s0 logs
drwxrwxrwx. username usergroup unconfined_u:object_r:httpd_user_content_t:s0 sessions
drwxrwxrwx. username usergroup unconfined_u:object_r:httpd_user_content_t:s0 tests

You need to change the seLinux context:
chcon -Rv --type=httpd_user_content_rw_t tmp/

changing security context of `tmp/logs'
changing security context of `tmp/cache/models'
changing security context of `tmp/cache/views'
changing security context of `tmp/cache/persistent'
changing security context of `tmp/cache'
changing security context of `tmp/sessions'
changing security context of `tmp/tests'
changing security context of `tmp/

# to get things going very quickly with cakephp
# do a bake  all in this order
./cake bake -app /home/username/public_html/mapdb-dev/ model all
./cake bake -app /home/username/public_html/mapdb-dev/ controller all
./cake bake -app /home/username/public_html/mapdb-dev/ view all


0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Clear HSTS Settings in CHrome

Open chrome://net-internals/#hsts enter the domain in the query field and click Query to confirm it has HSTS settings...

Ubuntu on Hyper-v

It boils town to installing linux-azure # as root or sudo apt-get update apt-get install linux-azure...