I have a form which uploads a picture to an upload folder on my Gnu/Linux host.
When the user registers, it creates a folder for them, in uploads, and puts their picture into it.
I have disabled indexing and obfuscated its location; but currently if you know the path to the file, eg website.com/uploads/user3/photo.png
, then you can access it. What permissions would I need to set on the user folders and their contents to protect these from prying eyes? In order for the upload function to work global needs to have read and write (which is annoying) so please take this into account.
From what I can see it should be quite difficult for people to find the filenames of these images as it stands (no indexing etc), but nevertheless, if they did they would be able to view/download them.
Any other tips appreciated.
By the way; My host does not seem to allow setfacl for some reason, a previous question suggested this as the answer.