Folder Access
How can you stop public access to the contents of a folder, by someone who types in a url such as:
...even if the folder has a 777 attribute? .htaccess files don't seem to be working on this server...is there another way to limit access, via PHP? Also, how do you delete .htaccess files?
Thanks,
TM
edit: this command, in an .htaccess file, seems to work: Options -Indexes FollowSymLinks
mjs416 posted this at 16:34 — 6th April 2004.
They have: 127 posts
Joined: Dec 2003
I dont think you want it chmod'd to 777 do you? Thats rwx-rwx-rwx which basically allows for anyone to do anything they want. Some servers wont even allow for you to chmod a file to 777.
I would think .htaccess would work; not very familiar with .htaccess syntax though. Sorry =(
TonyMontana posted this at 17:58 — 6th April 2004.
They have: 218 posts
Joined: Apr 2001
It's a client .jpg upload folder...unless there is another way, it needs to be chmod'ed 777.
Suzanne posted this at 20:17 — 6th April 2004.
She has: 5,507 posts
Joined: Feb 2000
The simplest approach is to put an index page that redirects them -- that way they have to know the filename to gain access. If you change the filename when they upload it (ideal), you're golden. So to speak. Unless you then link to those images in the upload folder!
Ideally the upload folder shouldn't ever been used as a browsable directory.
TonyMontana posted this at 01:02 — 7th April 2004.
They have: 218 posts
Joined: Apr 2001
The command listed in my first post stops all folders below the root from being browsable. Sessions and passwords for registered users control access to the application.
Suzanne posted this at 02:10 — 7th April 2004.
She has: 5,507 posts
Joined: Feb 2000
Ah, didn't see your edit, sorry.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.