-
yvthulek | 24. T4 2012, 11:16
Upload personal picture not workingHi,
I've setup ilias version 4.2.x and 4.1.4 on the same linux server. The data folder was setup to writable. But I can't upload personal picture and icon image to ilias. The notification was successfull, but the image is not came up.
Anyone can help me on this?
-
DZenker | 25. T4 2012, 14:32
Re: Upload personal picture not workingHi,
the pics are converted to different sizes after upload, and for this the command line convert tool which is part of the ImageMagick tool suite is needed. I guess that
- ImageMagick is not installed on your system, or
- the path to the convert tool was not defined during ILIAS setup or isn't defined in the ilias.ini.php config file, or
- convert is not in the standard directory (usually /usr/bin/ on Debian/Ubuntu systems).
Thus, check the path in the config file and the existence of convert in the given path. If it's not present, ImageMagick can be installed via package manager (e.g. sudo apt-get install imagemagick) or as self-installing exe on Windows systems.
Greets, Dietmar
-
yvthulek | 29. T5 2012, 05:44
Re: Re: Upload personal picture not workingHi,
Thank you for your answer Zenker.
But the problem are still there. I've the imagemagick installed and the path to the convert tool are correct. The weird thing is on the same server, i've another ilias installation (v 4.2.x) and the image/icon uploading are fine.
So I think the problems is on the setting of my ilias. The one with the uploading problems is using ilias v 4.1.9.
Any idea?
-
Peter Pellemans | pellemans | 13. T6 2012, 16:59
Re: Re: Re: Upload personal picture not workingI have the same problem. ImageMagick works fine, and I can see the individual jpgs that were created in directory usr_images. The error in the logs states that there were not enough privilges to read the file:
[Tue Jun 12 11:14:43 2012] [error] [client 94.103.146.186] (13)Permission denied: file permissions deny server access: /srv/iliasd/www/develop.iliasdutch.nl/data/mcbclient/usr_images/usr_189_small.jpg
When I manually change the permission on user_189_small.jpg from 660 to 664, the picture does show in my profile. So it is a simple permission setting. Any ideas how to fix this?
Thanks
-Peter
-
Lars | 14. T6 2012, 11:02
Re: Re: Re: Re: Upload personal picture not workingHi Peter,
depending on your setup for the webserver, you might want to change the default umask of the webserver-user to 112 instead of 007 or alternatively to run the webserver with a user, which has access to the group-part of the webserver and not as the user nobody.
Best Regards,
Lars -
Peter Pellemans | pellemans | 18. T6 2012, 15:31
Re: Re: Re: Re: Re: Upload personal picture not workingThank you, Lars. I think you hit the nail right on the head. Unfortunately, in our (shared) environment, suPHP is used for the web server account, which will access the images files as World. Since these files are created with 660, access is denied. They canot change that because several other clients are using the same shared server.
Are we forced to get a dedicated server so we can control the user for the web server?
Thank!
-Peter
-
Lars | 19. T6 2012, 09:50
Edited on: 19. T6 2012, 10:01 - do LarsRe: Re: Re: Re: Re: Re: Upload personal picture not workingHi Peter,
that depends on your setup. From what I understand, the webserver runs as nobody or a similar non-privileged user and the php runs via suphp as the client's user (e.g. pelleman). So the upload-script saves the profile pics with your owner and group, but as 660, so the webserver can't access it.
In this case, if you have access to your home directory, you might get away with changing the umask in your .bash_rc (although I don't think that this will work in a suPHP-setup, as this value is set in the global configuration file). If that doesn't, contact your hoster about the problems and ask him, if he could change your user settings for you. Last resort would be to solve it programmatically - either add a chmod to the upload code (and break update compatibility) or create a cronjob running every minute to perform the changes (and accept a delay in the accessability of the pictures). Pest or cholera. ;)
Best regards,
LarsUPDATE: I actually got another idea: Depending on what your hoster allows to set in the .htaccess-file, you might enforce a download through an internal php script of ILIAS (the web_access-method should suffice). That way, you would circumvent the access restriction, as the php-script would be run through suPHP instead of apache directly.
















