THELIA Forum

Welcome to the THELIA support and discusssion forum

Announcement

Rejoignez la communauté sur le Discord Thelia : https://discord.gg/YgwpYEE3y3

Offline


Hi all,

I'm installing Thelia 2.2.2 on my Debian 8 x64 server and I'm having some problems.

I used composer and than I did set as primary group of my Thelia-file-system-owner the www-data group, so I can make writable the cache folder by the www-data group.

When I connect to the http://mydomain.tld I get a blank page, and if I try with the http://mydomain.tld/index_dev.php file I get this error:

IOException in Filesystem.php line 85: Failed to create "/var/www/html/XXXX/cache/dev": mkdir(): Permission denied.

    in Filesystem.php line 85
    at Filesystem->mkdir('/var/www/html/XXXX/cache/dev') in Filesystem.php line 469
    at Filesystem->dumpFile('/var/www/html/XXXX/cache/dev/PropelConfig.php', '<?php return array ( 'dsn' => 'mysql:host=localhost;dbname=XXXX;port=3306', 'user' => 'XXXX', 'password' => 'XXXX', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper', 'options' => array ( 1002 => array ( 'value' => 'SET NAMES \'UTF8\'', ), ), );', null) in ConfigCache.php line 100
    at ConfigCache->write('<?php return array ( 'dsn' => 'mysql:host=localhost;dbname=XXXXXXX;port=3306', 'user' => 'XXXX', 'password' => 'XXXX', 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper', 'options' => array ( 1002 => array ( 'value' => 'SET NAMES \'UTF8\'', ), ), );', array(object(FileResource))) in Thelia.php line 134
    at Thelia->getPropelConfig() in Thelia.php line 82
    at Thelia->initPropel() in Thelia.php line 63
    at Thelia->__construct('dev', true) in index_dev.php line 30

Any idea about the reason?

Thank you in advance.
A.

Offline


Solved:

setting 775 (rwx rwx r-x) permissions to the following folders:

chmod -R 771 cache/
chmod -R 771 log/
chmod -R 771 web/
chmod -R 771 local/

and making them of the group www-data

sudo chown -R :www-data cache/
sudo chown -R :www-data log/
sudo chown -R :www-data web/
sudo chown -R :www-data local/

My only concern is: is this safe now? An I leaving something unsecured using this configuration?

Last edited by ant0nio (12-04-2016 17:39:57)

Offline


Set the Apache user as the directories owner (probably www-data), and set permissions to 755


OpenStudio Toulouse