Xinha uploaded file permissions problem
#1
Posted 24 April 2007 - 10:14 PM
Any one seen this before? I've read up on it and some people have smillar problems but couldnt really find a solution.
#2
Posted 24 April 2007 - 10:27 PM
#3
Posted 24 April 2007 - 10:28 PM
It's the script not chmodding correct when uploading. The etomite file manager should chmod correct after an upload automatically - try that to make sure.
Try contacting the actual writer of the Plugin.
#4
Posted 24 April 2007 - 11:23 PM
#6
Posted 25 April 2007 - 01:27 PM
Open manager/media/xinha/plugins/ImageManager/Files.php
Find line 68, which should read:
67 //verify that it copied, new file must exists 68 if (is_file($destination_dir.$filename)) 69 Return $filename; 70 else 71 return FILE_ERROR_COPY_FAILED; 72 }
And insert a new chmod() line between lines 68 and 69 as in the following code...
67 //verify that it copied, new file must exists 68 if (is_file($destination_dir.$filename)) 69 @chmod($destination_dir.$filename, 0644); 70 Return $filename; 71 else 72 return FILE_ERROR_COPY_FAILED; 73 }
Save the file, test it, and report back...
#7
Posted 27 April 2007 - 03:53 AM
Ralph, on Apr 25 2007, 01:27 PM, said:
Open manager/media/xinha/plugins/ImageManager/Files.php
Find line 68, which should read:
67 //verify that it copied, new file must exists 68 if (is_file($destination_dir.$filename)) 69 Return $filename; 70 else 71 return FILE_ERROR_COPY_FAILED; 72 }
And insert a new chmod() line between lines 68 and 69 as in the following code...
67 //verify that it copied, new file must exists 68 if (is_file($destination_dir.$filename)) 69 @chmod($destination_dir.$filename, 0644); 70 Return $filename; 71 else 72 return FILE_ERROR_COPY_FAILED; 73 }
Save the file, test it, and report back...
Hmm I have no such file named files.php in manager/media/xinha/plugins/ImageManager ??
#8
Posted 27 April 2007 - 04:04 AM
future assassin, on Apr 27 2007, 03:53 AM, said:
The file was in the Classes folder. I get the following error
Parse error: syntax error, unexpected T_ELSE in /home/iroxyca/domains/iroxy.ca/public_html/manager/media/xinha/plugins/ImageManager/Classes/Files.php on line 71
#9
Posted 27 April 2007 - 11:19 AM
future assassin, on Apr 27 2007, 05:04 AM, said:
Parse error: syntax error, unexpected T_ELSE in /home/iroxyca/domains/iroxy.ca/public_html/manager/media/xinha/plugins/ImageManager/Classes/Files.php on line 71
Replacement code should probably be
67 //verify that it copied, new file must exists
68 if (is_file($destination_dir.$filename)) {
69 @chmod($destination_dir.$filename, 0644);
70 Return $filename;
71 } else
72 return FILE_ERROR_COPY_FAILED;
73 }
#10
Posted 27 April 2007 - 01:09 PM
67 //verify that it copied, new file must exists
68 if (is_file($destination_dir.$filename)) {
69 @chmod($destination_dir.$filename, 0644);
70 Return $filename;
71 } else {
72 return FILE_ERROR_COPY_FAILED;
73 }
#11
Posted 28 April 2007 - 02:09 AM
Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/iroxyca/domains/iroxy.ca/public_html/manager/media/xinha/plugins/ImageManager/Classes/Files.php on line 218
#12
Posted 28 April 2007 - 03:22 AM
future assassin, on Apr 27 2007, 10:09 PM, said:
Parse error: syntax error, unexpected ';', expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/iroxyca/domains/iroxy.ca/public_html/manager/media/xinha/plugins/ImageManager/Classes/Files.php on line 218
#13
Posted 28 April 2007 - 05:54 PM
Ralph, on Apr 28 2007, 03:22 AM, said:
Ralph I tired your version and this is the one that was giving me the last error. I tried mikef's and this is the one that worked. Now uploaded images are set to 644 BUT I noticed the thumbnails in the .thumbs directory are still 600 although the dir is set to 777.
Thanks for the work.
Edited by future assassin, 28 April 2007 - 05:59 PM.
#14
Posted 28 April 2007 - 06:01 PM
#15
Posted 28 April 2007 - 06:03 PM
future assassin, on Apr 28 2007, 05:54 PM, said:
Thanks for the work.
Ok here's what I found. With Ralph's version you have to replace lines 67-71. I was replacing line 67-72.
#16
Posted 28 April 2007 - 06:05 PM
Dean, on Apr 28 2007, 06:01 PM, said:
I haven't but will try it right now and see what happens.
Report:
Same thing happens. Images are created with 600 for permissions.
Edited by future assassin, 28 April 2007 - 06:12 PM.
#17
Posted 28 April 2007 - 09:41 PM
#18
Posted 01 May 2007 - 08:52 AM
So far it'll have to do. One day we'll be able to run mod_php safely on shared servers and wont have to deal with weird things happening with suphp.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











