Mautic Community Forums

I need configuration help



I received an error:
Quote:
The site is currently offline due to encountering an error...
After many hours of research I was able to locate the following error from the error logs:
Code:
[Fri Sep 02 15:25:26.747612 2016] [:error] [pid 32475] [client ::1:60822] RuntimeException: Unable to create the logs directory (/var/www/html/mautic/app/logs)n in /var/www/html/mautic/app/AppKernel.php:520nStack trace:n#0 /var/www/html/mautic/app/AppKernel.php(488): AppKernel->buildContainer()n#1 /var/www/html/mautic/app/AppKernel.php(251): AppKernel->initializeContainer()n#2 /var/www/html/mautic/app/AppKernel.php(110): AppKernel->boot()n#3 /var/www/html/mautic/app/middlewares/CORSMiddleware.php(91): AppKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#4 /var/www/html/mautic/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\Middleware\CORSMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#5 /var/www/html/mautic/app/middlewares/VersionCheckMiddleware.php(56): Mautic\Middleware\CatchExceptionMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#6 /var/www/html/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\Middleware\VersionCheckMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#7 /var/www/html/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request))n#8 /var/www/html/mautic/index.php(30): Stack\run(Object(Stack\StackedHttpKernel))n#9 {main}

I updated using the following out of desperation and hope:
Code:
root@revivedrive:/var/www/html/mautic/app# chown -R www-data:www-data /var/www/html/mautic/app/cache root@revivedrive:/var/www/html/mautic/app# chown -R www-data:www-data /var/www/html/mautic/app/AppKernel.php root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic/app/logs root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic/app/cache root@revivedrive:/var/www/html/mautic/app# sudo service apache2 restartroot@revivedrive:/var/www/html/mautic/app# sudo chmod -R 777 /var/www/html/mautic root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 777 /var/www/html/mautic/app

My current permission list in app is the following:
Code:
-rwxrwxrwx 1 www-data www-data 143 Aug 25 00:01 AppCache.php -rwxrwxrwx 1 www-data www-data 17716 Aug 25 00:01 AppKernel.php -rwxrwxrwx 1 www-data www-data 396 Aug 25 00:01 autoload.php -rwxrwxrwx 1 www-data www-data 102325 Aug 25 00:04 bootstrap.php.cache drwxrwxrwx 24 www-data www-data 4096 Aug 25 00:01 bundles drwxrwxrwx 3 www-data www-data 4096 Aug 25 00:04 cache drwxrwxrwx 2 www-data www-data 4096 Sep 1 17:08 config -rwxrwxrwx 1 www-data www-data 1241 Aug 25 00:01 console -rwxrwxrwx 1 www-data www-data 1 Sep 2 14:29 logs drwxrwxrwx 4 www-data www-data 4096 Aug 25 00:01 middlewares drwxrwxrwx 2 www-data www-data 4096 Aug 25 00:01 migrations -rwxrwxrwx 1 www-data www-data 5 Aug 25 00:01 version.txt

Any help would be greatly appreciated!

I received an error:

After many hours of research I was able to locate the following error from the error logs:

[Fri Sep 02 15:25:26.747612 2016] [:error] [pid 32475] [client ::1:60822] RuntimeException: Unable to create the logs directory (/var/www/html/mautic/app/logs)n in /var/www/html/mautic/app/AppKernel.php:520nStack trace:n#0 /var/www/html/mautic/app/AppKernel.php(488): AppKernel->buildContainer()n#1 /var/www/html/mautic/app/AppKernel.php(251): AppKernel->initializeContainer()n#2 /var/www/html/mautic/app/AppKernel.php(110): AppKernel->boot()n#3 /var/www/html/mautic/app/middlewares/CORSMiddleware.php(91): AppKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#4 /var/www/html/mautic/app/middlewares/CatchExceptionMiddleware.php(43): Mautic\Middleware\CORSMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#5 /var/www/html/mautic/app/middlewares/VersionCheckMiddleware.php(56): Mautic\Middleware\CatchExceptionMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#6 /var/www/html/mautic/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Mautic\Middleware\VersionCheckMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)n#7 /var/www/html/mautic/vendor/stack/run/src/Stack/run.php(13): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request))n#8 /var/www/html/mautic/index.php(30): Stack\run(Object(Stack\StackedHttpKernel))n#9 {main}

I updated using the following out of desperation and hope:

root@revivedrive:/var/www/html/mautic/app# chown -R www-data:www-data /var/www/html/mautic/app/cache root@revivedrive:/var/www/html/mautic/app# chown -R www-data:www-data /var/www/html/mautic/app/AppKernel.php root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic/app/logs root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 755 /var/www/html/mautic/app/cache root@revivedrive:/var/www/html/mautic/app# sudo service apache2 restartroot@revivedrive:/var/www/html/mautic/app# sudo chmod -R 777 /var/www/html/mautic root@revivedrive:/var/www/html/mautic/app# sudo chmod -R 777 /var/www/html/mautic/app

My current permission list in app is the following:

-rwxrwxrwx 1 www-data www-data 143 Aug 25 00:01 AppCache.php -rwxrwxrwx 1 www-data www-data 17716 Aug 25 00:01 AppKernel.php -rwxrwxrwx 1 www-data www-data 396 Aug 25 00:01 autoload.php -rwxrwxrwx 1 www-data www-data 102325 Aug 25 00:04 bootstrap.php.cache drwxrwxrwx 24 www-data www-data 4096 Aug 25 00:01 bundles drwxrwxrwx 3 www-data www-data 4096 Aug 25 00:04 cache drwxrwxrwx 2 www-data www-data 4096 Sep 1 17:08 config -rwxrwxrwx 1 www-data www-data 1241 Aug 25 00:01 console -rwxrwxrwx 1 www-data www-data 1 Sep 2 14:29 logs drwxrwxrwx 4 www-data www-data 4096 Aug 25 00:01 middlewares drwxrwxrwx 2 www-data www-data 4096 Aug 25 00:01 migrations -rwxrwxrwx 1 www-data www-data 5 Aug 25 00:01 version.txt

Any help would be greatly appreciated!

Seems like you took care of the permissions – went a bit overboard, but the logs are not being listed as a directory, look at bundles, it has a “d” in front and the logs don’t, it has a “-”… are you sure it’s a directory? I think you need to create a directory with the mkdir logs command and set permissions, you’re missing it.
Also, clear the cache, delete the prod folder under /app/cache, before you browse to your site.

I didn’t see your answer until much later but thanks a lot for your willingness to help! I initially created a logs file vs. a directory and updated appropriately.