I am using Laravel with a local filesystem as storage driver.
I have understood that I can save files in the storage/public
folder to make them accessible through myapp.dev/storage/image.jpg
. I have also understood that I can make images accessible only for authenticated users like explained here.
What I have not understood it the File Visibility property. If files are public depending on the folder that I stored them, why would I need to declare them additionally as private
or public
? Could anyone give a use case where this would be necessary?
www-data
user and php-fpm is run as its own user. Private files are 0600 permissions by default, sowww-data
can't read them. – Amharic