XF 1.4 Bad CHMOD in ImageMagick-created avatars

Valter

Active member
Hello,

My problem is that when user upload avatar, ImageMagick creates small and medium variants which are CHMOD 600. This means they are not displayed in posts. What should I do to force IM to CHMOD files correct (644)?
 
Last edited:
Large avatar has proper permissions after upload, medium and small not, so I think large one is untouched but medium and small are chmoded improperly after conversion? ImageMagick is set as image processor in AdminCP.

I've tried with $config['chmodWritableValue'] = 0644; in config.php (find it suggested somewhere) but it makes no any changes.
 
I've seen things like this before when servers have disabled the chmod function. You can check admin.php?tools/phpinfo and look at the disable_functions line to see if it's disabled there.

If so, unfortunately there isn't anything you can directly do about it. You need to contact your host and have them re-enable the chmod function or they need to fix the umask on the user PHP is running as to not create files as 0600.
 
I've tried with custom php.ini they gave me before. Found/removed "chmod" from "disable_functions" and it works now!

Thank You Mike!

Is there anything else important to XenForo here I should remove?

disable_functions = ini_alter, curl_exec, exec, system, passthru, shell_exec, proc_open, proc_close, proc_get_status, proc_nice, proc_terminate, leak, listen, chgrp, set_time_limit, apache_note, apache_setenv, closelog, debugger_off, debugger_on, define_syslog_variables, openlog, syslog,ftp_exec, phpinfo, dl;
 
set_time_limit and potentially phpinfo. That said, there are others that may be used in the future. I generally find disabling PHP functions to be an exercise in futility.
 
Top Bottom