try this:
after you create your directory/file using PHP, make this your next PHP command:
chmod("/usr/home/terra/www/$Directory/assets", 0777);
REASON: PHP create the file as 0755 on a mkdir command so you must come right behind and make it world writeable.
That ought to solve your problem.
Raymond Simmons wrote:
The short of it is, I can't upload a file via FTP to a directory created by a PHP script called from a browser. I can upload to the directory using a PHP script in a browser.
The details... mkdir ("/usr/home/terra/www/$Directory/assets", 0777) creates the folder with permissions set to 755, user nobody and group nobody. I recently discovered that PHP won't allow me to create a folder with permissions set to 755. That's OK, but I still have a problem: when I try to upload a file to this directory using FTP while logged in as user terra, group terra, I get a permissions denied message. If my sys admin changes the user and group ownership to terra.terra on that folder, I can't upload files through a browser via a PHP script.
Is there any way to create the directory using PHP so that I can FTP to it and upload to it through a browser using PHP?