permissions

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
spartan7
New php-forum User
New php-forum User
Posts: 17
Joined: Sat Jun 18, 2005 9:08 pm

Wed Jun 14, 2006 6:45 pm

Hi

I've built a CMS ... I need to be able to upload images, however for that to happen, I need to cmod the images directory 777 no? What type of danger am I opening myself to if I keep the directory open with those sort of permissions?

If I FTP I can set the folder permissions, from php the cmod function does nothing. Any suggestions for how I can allow uploading without keeping a folder open with 777 permissions?

User avatar
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Wed Jun 14, 2006 7:52 pm

keep a folder below the public_html for your images that will allow you to have a little safer 777 folder. Only other way around that is to run the webserver as the user.

Check out http://suphp.org or http://httpd.apache.org/docs/1.3/suexec.html

note: for suPHP and suEXEC to work you must be using the CGI version of php..

Post Reply