Storage public disk files - 403 on test environment, not on local
Hi,
I am getting a problem on my test environment, that I don't have on my local machine. Files displayed with the Storage class respond with a Forbidden 403.
To be more precise :
image files are stored on the 'public' disk with this config
You might want to check the ownership (rather than the permissions) of folders, starting from webroot. If your web server (apache, nginx, whatever) has limited access, you'll be barred from writing files.
I have user:www-data with 2775 perms on my webroot. Gives me and apache rights to do anything (could be argued that apache shouldn't be able to execute scripts) which prevents errors like you're seeing.
yes got the same problem. No way to change owner on shared hosting.
Even on local, I struggled hours to make everything works with the symlink stuff, and honestly I don't see any benefit to have this instead of a regular folder in the public directory.
It's said It's to prevent ressources be accessible from the url, but everything is accessible through 'www.domaine.com/storage/pathToResource.jpg' anyway.