web/config.php; file permission problem

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

Moderators: dwhittle, Ian

web/config.php; file permission problem

Postby Questionarius » Wed Jul 13, 2011 3:07 pm

Hello,

I have 2 major problems:
1. Change the permissions of the "app/cache/" directory so that the web server can write into it.
2. Change the permissions of the "app/logs/" directory so that the web server can write into it.

I've already change permission for those directories (chmod 777 -R cache; chmod/ 777 -R logs/) but still have above problems appear. Please help!

PS.
I'm using Symfony Standard 2.0 RC4 with installed vendors
PS2.
is_writable function returns false for directories listed when I execute config.php file from web browser, but when I execute this file from shell it returns true!
Last edited by Questionarius on Wed Jul 13, 2011 10:33 pm, edited 2 times in total.
Questionarius
Junior Member
 
Posts: 2
Joined: Wed Jul 13, 2011 3:00 pm

Re: web/config.php; file permission problem

Postby Questionarius » Wed Jul 13, 2011 3:20 pm

I'm using Symfony Standard 2.0 RC4 with installed vendors
Questionarius
Junior Member
 
Posts: 2
Joined: Wed Jul 13, 2011 3:00 pm

Re: web/config.php; file permission problem

Postby Think » Thu Jul 14, 2011 5:26 pm

So, what 'ls -l' displays for these dirs?
User avatar
Think
Member
 
Posts: 31
Joined: Thu Aug 13, 2009 8:37 pm
Location: Hamburg

Re: web/config.php; file permission problem

Postby halfer » Sun Jul 17, 2011 11:44 am

Are you on shared hosting? What errors are you getting, exactly? Check your permissions, as @Think says.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: web/config.php; file permission problem

Postby ringhio » Thu Jul 21, 2011 8:26 pm

Take a look at this http://symfony.com/doc/current/book/installation.html in the "Setting up Permissions" note.
User avatar
ringhio
Member
 
Posts: 57
Joined: Wed Aug 06, 2008 9:57 am

Re: web/config.php; file permission problem

Postby jribeiro » Thu Sep 29, 2011 8:56 pm

Hi there!!

I'm new on symfony and on this forum! :)

I uploaded all files to my server (shared), changed the file web/config.php so I could access it from non localhost machine (just added my work ip) and accessed the file.

I got the following errors:
1. You are running PHP version "5.2.17", but Symfony needs at least PHP "5.3.2" to run. Before using Symfony, install PHP "5.3.2" or newer.
2. Change the permissions of the "app/cache/" directory so that the web server can write into it.
3. Change the permissions of the "app/logs/" directory so that the web server can write into it.
4. Set the "date.timezone" setting in php.ini* (like Europe/Paris).

The 1st and 4th don't worry me and I've placed a support ticket to the hosting company so they can make this arranjements.

The 2nd and 3rd problems worry me though... I've set the permissions to 777 through ftp recursivly but the error persists! I only have ftp access so i ran out of ideas.

I hope to deploy symfony accross multiples websites so I can't be asking the hosting to be changing the permissions constantly.

Also isn't it a bit unsafe to set the permissions for 777??

Thanks you all
jribeiro
Junior Member
 
Posts: 5
Joined: Thu Sep 29, 2011 8:50 pm

Re: web/config.php; file permission problem

Postby goyote » Sat Oct 08, 2011 1:50 am

some shared hosting offer a linux shell, not sure if yours do. Basically check the user that owns the dir with

ll app/cache

then make sure the permissions for that user has a rwx
User avatar
goyote
Junior Member
 
Posts: 29
Joined: Wed Jun 01, 2011 9:19 pm

Re: web/config.php; file permission problem

Postby didlou » Fri Apr 06, 2012 7:24 pm

Hello,

If you can't written app/cache and app/logs
message:

Change the permissions of the "app/cache/" directory so that the web server can write into it.
Change the permissions of the "app/logs/" directory so that the web server can write into it.

see troubleshoots selinux

the problem detail :

SELinux is preventing /usr/sbin/httpd from write access on the dossier logs.

***** Plugin httpd_write_content (92.2 confiance) suggéré********************

Si vous souhaitez autoriser httpd à accéder à write sur logs directory
Alors you need to change the label on 'logs'
Faire
# semanage fcontext -a -t httpd_sys_rw_content_t 'logs'
# restorecon -v 'logs'

in command line ; # service httpd restart

reload Symfony config.php
and ........ After

Welcome!

Welcome to your new Symfony project.

This script will guide you through the basic configuration of your project. You can also do the same by editing the ‘app/config/parameters.ini’ file directly.

Configure your Symfony Application online
Bypass configuration and go to the Welcome page
Re-check configuration

That's it
didlou
Junior Member
 
Posts: 1
Joined: Fri Apr 06, 2012 7:03 pm


Return to Installation and setup

Who is online

Users browsing this forum: Google [Bot] and 2 guests