I have a problem with my Laravel project on VPS. Locally everything works fine, but on VPS sometimes folder permission changes and web site stops to work. I don't know what causes this problem and what should I do?
Every time I have to fix with this code:
sudo chown -R user:user /data/web/website.com
There may be some script which is rewriting the permissions for your folder. Go with the .htaccess file that will definately work.
Related
Faced a problem accessing the storage folder. A symbolic link was created, but when I try to access any file in the storage folder, I get an error 403 "You do not have permission to access this object. The file is not readable, or the server cannot read it." I have a second project on a local machine, everything works fine there. I tried to give 777 permissions to the storage folder, but this causes the "Permisson denied" error. I will be glad to any help!
Macos catalina
Laravel Permissions
first change ownership of the laravel directory to our web group.
sudo chown -R :www-data /var/www/laravel
Next we need to give the web group write privileges over our storage directory so it can write to this folder.
sudo chmod -R 775 /var/www/laravel/storage
where laravel is the name of the root
I am trying to run CodeIgniter for the first time. I have a running apache2 server on my machine. I downloaded CodeIgniter and copy extracted folder it into /var/www/html folder. Also, I set baseUrl config in CodeIgniter
$config['base_url'] = 'http://localhost/codeIgniter';
But I am getting
Forbidden
You don't have permission to access /codeIgniter/ on this server.
I tried setting .htaccess file but couldn't fix the issue. what is the solution for this issue?
This is a pretty vague question but here are some trouble shooting things.
In the HTML folder do: chown -R www-data:www-data nameOfProject.
Also did you set up everything in your apache/sites-available and sites-enabled. Also set up your host file
If this doesn't work just google setting up a ci project.
The reason you had to chown it was to allow appache to access it
I'm trying to work with Laravel 5 on NetBeans.
Now, I'm trying to var_dump through Laravel 5 to understand how the application works, and I keep getting 500 errors when I have even a simple syntax error in my code, and it doesn't output the error log like normally. From what I understand by research is that it's caused by Laravel not being able to write into /storage/ folder in Laravel.
I created a new group netbeans and added www-data user to it, so right now I'm trying to figure out how do you install it so that Laravel 5 and NetBeans could 'recognize' each other. Right now I have NetBeans installed with apt-get install, and now that I've changed the Laravel 5 project rights with:
chown -R www-data:netbeans laravel5/
Now I can't access Laravel's project files with NetBeans because of right issues. All this is sort of confusing to me, so my question is:
How do I properly setup NetBeans and Laravel so I could edit my Laravel project folders files and somehow have Laravel access /storage/ folder inside Laravel, so I would not see 500 error and a blank page on every syntax error I make?
P.S: I tried to be as precise and explanatory as I could be
Check write permissions on storage folder!
Try:
sudo chmod -R 777 storage/
(i known that 777 is a bad thing to do, only do this to test).
After reading enter link description here it could also be a problem of permissions to write to the log folder. See the last comment from shiny
I'm starting to develop a site in ubuntu 14.04. I'm using apache2, so I placed my files under /var/www/html/ folder. Everything was working fine, but I had to restart my current work so I copied the entire project folder from another path, like this
$ sudo cp ~/path/to/folder /var/www/html/
And now I can't see my images, a simple imgtag. I just see this.
When I look for the file, I can see that I'm having an error 403 forbidden. I saw some suggestion to add the option Require all granted but that option is already set in my apache. I suspect that is because the new folder is a copy from a folder without root permissions, so I tried chmod but that also didn't work so I'm completly lost now.
So, how can I see my images from localhost? and most important is why this happen suddenly?
I have changed my server with a project running on codeigniter. I already installed everything (PHP, MySQL, Codeigniter, etc) and all the processes seem to work fine.
But now I'm trying to connect to my project homepage, but I only receive a blank page.
It's not a rewrite problem (the Codeigniter index.php works fine...I can echo anything within the index.php). The database login is also correct.
Any ideas how to debug so that I can find a solution.
it was a CHMOD Problem:
the log folder was not writeable. the strange thing: both folders have CHMOD 755, but when I changed the folder to 777 the site works...