Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
uploading files permission 600 in php v5.2.5 - bug?
#1
Hi folks,

i did a fresh, clean install with GS 2.01 on a friend's server (php v5.2.5). After Uploading files in the FILES tab i had no read permissions. In Transmit I checked the permissions: 600 ! My friend said it could be a bug in his php version, which is fixed in 5.2.8:

"Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK. (Andrew Sitnikov")
http://www.howtoforge.com/forums/showthr...p?p=221273

He told me to change /admin/upload.php and admin/upload-ajax.php and add a line of php-code after the move_uploaded_file line:


//create file
move_uploaded_file($_FILES["file"]["tmp_name"], $file_loc);

// Set temporary to have the correct permissions
chmod($targetFile, 0644);



I changed it, an the permissions are now okay. I will post this here, so you can tell me if it is a bug in GS or still a wrong configuration in my scripts or something else!

Greetings from Dresden
Tobias
Reply


Messages In This Thread
uploading files permission 600 in php v5.2.5 - bug? - by tobi - 2010-03-14, 19:54:35



Users browsing this thread: 1 Guest(s)