TechnicSolder: Error in exception handler: Permission Monolog/Handler/StreamHandler.php

The stream or file “/var/www/html/TechnicSolder/app/storage/logs/solderlog-2018-03-10.txt” could not be opened: failed to open stream: Permission denied in /var/www/html/TechnicSolder/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107

First setup. Followed the guide. Perms are recusive…


[quantomworks@solder-io TechnicSolder]$ cat  /etc/httpd/sites-availible/solderio.thebobsgamingnetwork.com.conf
<VirtualHost *:80>

        # Host that will serve this project.
        ServerName solder.thebobsgamingnetwork.net

        ServerAdmin sfxworks@gmail.com

        # The location of public directory.
        DocumentRoot /var/www/html/TechnicSolder/public/

        # Important options for solder public directory.
        <Directory /var/www/html/TechnicSolder/public>
              Options FollowSymLinks
              AllowOverride All

              # requires mod_version
              <IfVersion >= 2.4>
                    Require all granted
              </IfVersion>
              <IfVersion < 2.4>
                    Order allow,deny
                    Allow from all
              </IfVersion>
        </Directory>


</VirtualHost>


[quantomworks@solder-io TechnicSolder]$ cat  /etc/httpd/conf/httpd.conf  | grep apache
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
User apache
Group apache
    # http://httpd.apache.org/docs/2.4/mod/core.html#options

[quantomworks@solder-io TechnicSolder]$ ls -lah
total 208K
drwxr-xr-x.  7 apache apache 4.0K Mar 10 03:24 .
drwxr-xr-x.  3 apache apache   67 Mar 10 06:32 ..
drwxr-xr-x. 14 apache apache  228 Mar 10 03:58 app
-rwxr-xr-x.  1 apache apache 2.4K Mar 10 03:00 artisan
drwxr-xr-x.  2 apache apache   60 Mar 10 03:00 bootstrap
-rwxr-xr-x.  1 apache apache 2.1K Mar 10 03:00 composer.json
-rwxr-xr-x.  1 apache apache 156K Mar 10 03:24 composer.lock
-rwxr-xr-x.  1 apache apache 1.5K Mar 10 03:00 CONTRIBUTING.md
drwxr-xr-x.  8 apache apache  163 Mar 10 03:00 .git
-rwxr-xr-x.  1 apache apache  216 Mar 10 03:00 .gitattributes
-rwxr-xr-x.  1 apache apache  185 Mar 10 03:00 .gitignore
-rwxr-xr-x.  1 apache apache 2.2K Mar 10 03:00 LICENSE
-rwxr-xr-x.  1 apache apache  997 Mar 10 03:00 phpunit.php
-rwxr-xr-x.  1 apache apache  567 Mar 10 03:00 phpunit.xml
drwxr-xr-x.  9 apache apache  175 Mar 10 03:00 public
-rwxr-xr-x.  1 apache apache 2.6K Mar 10 03:00 README.md
-rwxr-xr-x.  1 apache apache  519 Mar 10 03:00 server.php
-rwxr-xr-x.  1 apache apache 1.6K Mar 10 03:00 .travis.yml
drwxr-xr-x. 32 apache apache 4.0K Mar 10 03:24 vendor


[quantomworks@solder-io TechnicSolder]$ sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-03-10 07:53:38 UTC; 3min 18s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 25760 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 25764 (httpd)
   Status: "Total requests: 1; Current requests/sec: 0; Current traffic:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─25764 /usr/sbin/httpd -DFOREGROUND
           ├─25767 /usr/sbin/httpd -DFOREGROUND
           ├─25768 /usr/sbin/httpd -DFOREGROUND
           ├─25769 /usr/sbin/httpd -DFOREGROUND
           ├─25770 /usr/sbin/httpd -DFOREGROUND
           ├─25771 /usr/sbin/httpd -DFOREGROUND
           └─25773 /usr/sbin/httpd -DFOREGROUND

Mar 10 07:53:38 solder-io systemd[1]: Starting The Apache HTTP Server...
Mar 10 07:53:38 solder-io systemd[1]: Started The Apache HTTP Server.


[quantomworks@solder-io TechnicSolder]$ php -version
PHP 5.6.33 (cli) (built: Jan 14 2018 08:07:11)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies


[quantomworks@solder-io TechnicSolder]$ php -m
[PHP Modules]
apc
apcu
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mcrypt
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


[quantomworks@solder-io /]$ rpm --query centos-release
centos-release-7-4.1708.el7.centos.x86_64

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 28 (10 by maintainers)

Most upvoted comments

Sidenote, this is issue 655 (get it? chmod 655? no? ill stop…)

Some googling many folks point to clearing the cache after/before changing the permissions. I’m not sure I follow this but its worth trying:

php artisan cache:clear 
chmod 775 app/storage
composer dump-autoload

It would be if you were running php with mod_php; but I don’t see that mod so I assume its probably php-fpm. check /etc/php-fpm.d/www.conf file for the user and group that php-fpm is running under.