This topic is locked

uploaded files ownership problem

6/6/2007 3:28:02 PM
PHPRunner General questions
Allenh author

We've set up an app to upload files - it works great. The problem is that the ownership of the files is taken by the server (nobody@domain) which means that I can't change any permissions or download the files via ftp. Files that are zipped can be 'saved' via browser.
I've spoken with our hosting company, and they were nice enough to let me know that there is a PHP function (chown) that needs to be added/changed to modify the ownership to the domain user - but I'm not sure where/how to do this. Some guidance would be greatly appreciated.
Thanks,

Allen.

Alexey admin 6/7/2007

Allen,
please try to do the following.
Open add.php file in C:\Program Files\PHPRunner4.0\source folder with a text editor.

Find this snippet there:

foreach ($files_move as $file)

move_uploaded_file($file[0],$file[1]);

and replace it with:

foreach ($files_move as $file)

{

move_uploaded_file($file[0],$file[1]);

if(strtoupper(substr(PHP_OS,0,3))!="WIN")

chmod($file[1],0777);

}



Do the same with edit.php file.

Then rebuild your pages and upload them to the server.
Let me know if this helps and we'll apply these changes to PHPRunner.

Allenh author 6/23/2007

Sorry it took me so long to get back to this. It works brilliantly. I was able to upload the files, but more importantly, I was able to download via ftp.

Thank you very much.

Allen.

Allen,

please try to do the following.
Open add.php file in C:\Program Files\PHPRunner4.0\source folder with a text editor.

Find this snippet there:

and replace it with:
Do the same with edit.php file.

Then rebuild your pages and upload them to the server.
Let me know if this helps and we'll apply these changes to PHPRunner.