Since your Apache is already serving then you have permission problems only. And since you're using Mac, the default user name and group in Apache conf is _www
for Mac and not www-data
that is for Ubuntu. You can see it in the httpd.conf
file :
<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User _www
Group _www
</IfModule>
Now, use terminal, get in your project directory let's say cd /var/www/laravel-project1
and make sure that the group _www
(or the user too in some case of your App environment logic` has access (read and write) to :
All public directory and sub-directories containing assets if you have.
sudo chgrp -R _www public
sudo chmod -R 774 public
Storage directory and sub-directories specified here (storage/framework
-> all, storage/logs
-> all, storage/app
-> public
directory only), and bootstrap/cache directory and files
sudo chgrp -R _www storage/framework storage/logs storage/app/public bootstrap/cache
sudo chmod -R 774 storage/framework storage/logs storage/app/public bootstrap/cache
That should get rid of all of your permissions problem to access pages.
BUT now if on using the page, sessions and logs files that are created you get other problems, there might be a last problem of permission which is called UMask
, which tell Apache or Web Server like Nginx what permission to assign to newly created directory or files for the user _www
. By default Apache umask
is 0002
, which give 0775
for directory and 0664
for new file. If ever umask
value was changed to 0022
like it's the default in Nginx, then the equivalent permissions 0755
or 0644
will not be sufficient for your Apache group _www
to write in the directories that have group _www
. So you can either change umask
to 0002
or change owner to _www
:
sudo chown -R _www public storage/framework storage/logs storage/app/public
So that depends on your configs.
vendor
folder then runcomposer install
- Ibrahim MohamedIlluminate\View\ViewServiceProvider::class,
inconfi/app.php
- Dhruv Raval