Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: bakedjake
My Server is Apache/PHP
I was setting image folder to 0773 but then i found that i need to use php to read directory image and delete some every some period, so it should be 0777 to be able to do that!
So my question, is it as safe to just put an empty index.php file in the image folder like setting it to 0773?
Thanks in advance
An empty index.html will serve web browsers an empty page. (Presuming your server is set to use index.html as a default page.) This will prevent browsers from seeing an index of your files, which they might if you had no default page.
However, the other method mentioned above is better for this purpose.
Unix/Linux file permission are used to control access to files by other users logged-in to a shell. If you are on a shared server, you need to use file permissions to prevent other customers of the hosting service from seeing or altering your files.
If you are on a dedicated server or a VPS, which you control exclusively, file permissions are less important - you probably have no other shell users.
However, you probably should still concern yourself with file permissions, as you may from time to time have others (employees, consultants) working on your machine, and may wish to make access available on a "need to know" basis. As well, careful use of file permissions can help control any successful break-in or exploit to your site that gives an attacker control of a non-root account.
[edited by: jtara at 4:34 pm (utc) on Oct. 6, 2007]