Page 1 of 1

CHMOD folder for web upload & FTP?

Posted: Sat May 03, 2003 4:57 pm
by tsg
I have been working on a file manager for a client where he can upload files, create folders, etc. Works great. BUT, I have the main folder CHMOD at 777 and when the scripts creates a folder, it CHMOD at 777.

My problem is now I can not FTP anything in to those folders. "Permission Denied" (sounds like my ex-wife).

So, how can I CHMOD so where I can upload from a form on the web AND FTP??

Thanks

Posted: Thu May 08, 2003 5:54 am
by Wayne
if the folder attribs are 777 you should be able to upload and ftp in, are the folders outside of your ftp home folders path? if so this would prevent you from ftping into them.

Posted: Thu May 08, 2003 8:58 am
by tsg
I did a lot of research and find out that it is a bug or something in PHP. I added a chmod line to my code and works perfectly now ..

mkdir("$path/$folder/$new_folder", 0777);
chmod("$path/$folder/$new_folder", 0777);

Maybe this will help someone down the road.