Friday, 6 September 2013

symfony deploy permision error

symfony deploy permision error

I'm doing first deploy on my server, but I have problem with permisions.
I'm using jenkins for deploy my build step looks like this:
echo '
parameters:
database_driver: pdo_mysql
database_host: %database.host%
database_port: null
database_name: symfonyapp
database_user: %database.user%
database_password: %database.password%
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: cs
secret: 08b6b8f6548a96bd1ff1533ec02e39ae
'> app/config/parameters.yml
export SYMFONY__DATABASE__USER=user
export SYMFONY__DATABASE__HOST=localhost
export SYMFONY__DATABASE__PASSWORD=secret
composer.phar install --optimize-autoloader
php app/console cache:clear --env=prod --no-debug
php app/console assetic:dump --env=prod --no-debug
touch app/logs/prod.log
chmod -R 777 app/cache
chmod -R 777 app/logs
But I'm getting this error and don't know why because I set everything,
also folder logs and cache are writable
[Fri Sep 06 12:09:24 2013] [error] [client 217.112.169.14] PHP Warning:
mkdir(): Permission denied in /projectPath/app/cache/prod/classes.php on
line 315
[Fri Sep 06 12:09:24 2013] [error] [client 217.112.169.14] PHP Fatal
error: Uncaught exception 'UnexpectedValueException' with message 'The
stream or file "/projectPath/app/logs/prod.log" could not be opened:
failed to open stream: No such file or directory' in
/projectPath/app/cache/prod/classes.php:4787\nStack trace:\n
#0 /projectPath/app/cache/prod/classes.php(4735):
Monolog\\Handler\\StreamHandler->write(Array)\n
#1 /projectPath/app/cache/prod/classes.php(4664):
Monolog\\Handler\\AbstractProcessingHandler->handle(Array)\n
#2 /projectPath/app/cache/prod/classes.php(4850):
Monolog\\Handler\\AbstractHandler->handleBatch(Array)\n
#3 /projectPath/app/cache/prod/classes.php(5066):
Monolog\\Handler\\FingersCrossedHandler->handle(Array)\n
#4 /projectPath/app/cache/prod/classes.php(5166):
Monolog\\Logger->addRecord(500, 'Uncaught PHP Ex...', Array)\n
#5 /projectPath/app/cache/prod/classes.php on line 4787

No comments:

Post a Comment