0

Hello i created a linux server on microsoft Azure to host my Laravel application , it works perfectly on my local machine but it doesn't work on the server. I changed the permission to 0755 but nothing seems to be working. i still get the same error. please can someone give me any suggestions or a suitable alternative. Thanks in advance

1 Answers1

0

Do not change octal permission numbers. By default Laravel have setted up that. You need to just give the right ownership for "storage/" folder, and for "bootstrap/cache" folder as well for addition. Like this:

# One-time command for your PC
# give sudo-privileges your current username
sudo usermod -a -G www-data $USER


# Here keep in mind that you need to replace "www-data" to the actual webserver name.
# For some many cases it's the "www-data", but it could be "apache", "httpd" etc for other cases for Apache, or something else
# 
# Setup ownerships/permissions
sudo chown -R $USER:www-data storage/ bootstrap/cache/
sudo chgrp -R www-data storage bootstrap/cache/
sudo chmod -R ug+rwx storage bootstrap/cache/

For detailed explanation read this

boolfalse
  • 1,892
  • 2
  • 13
  • 14