Page 1 of 1
CHMOD problem
Posted: 13 Nov 2008, 10:48
by shaman
I'm experiencing problems with CHMOD with my imagevue copy, I'm running php 5 and this versions sets 600 instead 644, so I'm gettin an error 403 instead image can I change this somewhere in upload module in imagevue? I know that in the old version of imagevue 1.x that was in uplod.php file, but couldn't find it in V2.
I'll be very grateful for any help
Cheers
Shaman
Posted: 13 Nov 2008, 11:34
by Nick
You probably could look in imagevue/admin/controllers/indexcontroller.php near
/**
* Upload file
*
*/
function uploadAction()
or better yet get it touch with your hosting support
Posted: 13 Nov 2008, 12:02
by shaman
In the old version I've put something like this:
$copy = move_uploaded_file($tmp_name,'../'.$path.$file_name);
chmod('../'.$path.$file_name,644);
}
but in the new version it doesn't seems to be working
$result = @move_uploaded_file($imageData['tmp_name'], $fullpath);
chmod('../'.$path.$file_name,644);
Have You got any clue what should I change? I'm certain that it's not that hard to do, problem is that I'm not a php expert
I know that this issue it's because of the new PHP 5 security update, which is changing CHMODS automatically, so it's an important issue, to be solved!
Posted: 13 Nov 2008, 15:39
by Nick
I think it should be 0644, not 644. Octal, you know.
http://php.net/chmod
Posted: 13 Nov 2008, 16:35
by shaman
Yes, I know, I tryied both, at the old version was working good, but new doesn't works at all :/
Posted: 14 Nov 2008, 04:18
by Nick
Not sure what security update you talking about. Do you have a link?
Hard to say why it's not working on your server, second thing that comes to my mind - maybe you should chmod directory first? There is chmod 0777 on files by default.
Posted: 15 Nov 2008, 09:56
by shaman
Hi
I've been told by my hosting provider, that I'm experiencing those problems because of the new php version which is: 5.2.0-8+etch13.
On the other server, where the uploading script is working properly, there is a 5.2.1 (safe_mode is turned off on both).
Permissions are 777 for folders, and 644 for files on both servers.
Older version of gallery with a different uploading script was working on this server, after I added one line containing chmod command, but new version though have this line already doesn't seems to changing permissions while uploading a new image files.
This might be helpful:
http://bugs.php.net/bug.php?id=42291&thanks=6
Posted: 18 Nov 2008, 17:01
by Nick
Hope they upgraded your php installation too.