Forum Moderators: phranque
Do I need to set the file permission to 755 on my admin folder and the folders within it or can they be 777 since it's password protected anyway?
I'm having trouble getting stuff to communicate in the admin. For example, when I run a certain script it creates a page from a template and tries to store it in a folder but it says permission denied on that folder unless I have the permission set to 777 on it.
So I'd rather just 777 everything in my admin and keep it password protected. Is that still secure?
Thanks.
Is a password-protected folder with 777 file permissions secure?
Nope. This means anyone in the world can write to that file. It's not secure one bit.
Not only can anyone in the world write to it, but anyone in the world can execute it too.
Password protecting it *may* secure it temporarily, but there's no promise of that. I would recommend taking a step back and fixing the problem within your admin.
Also, what if I moved my admin out of the public realm like so:
Current path: /home/username/public_html/admin
new path: /home/username/admin
Either way, I'll spend some time trying to fix the problem the correct way as you suggested. Still interested in answers to the above questions though. Thanks.
Hope that helped.
My previous domain host wasnt able to help me out so I switched and after that my scripts worked with 755 permissions and I didnt do anything different. I switched so they could help with my problem but after I switched I didnt even have the problem anymore.
By the way, I went with Westhost, who hosts WebmasterWorld.
777 permissions are needed so the script can write to these folders.
The webserver is running as user apache now.Yes, it is not the most secure setup. However we are in process in upgrading the server software to suexec mode.
When running under suexec the script will be able to write to these folders regarding their permissions as it will run under your hosting user credentials.
If you'd like to disable access to these folders you can place a .htaccess files within them with the following line
deny from all
In this way they will not be accessible through the web.
Please note that your admin should be secure enough with the user/pass protection.