1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Bad CHMOD in ImageMagick-created avatars

Discussion in 'XenForo Questions and Support' started by Valter, Sep 14, 2014.

  1. Valter

    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: Sep 14, 2014
  2. Mike

    Mike XenForo Developer Staff Member

    Is this any avatar, or just one created by ImageMagick? Permissions should generally be set after writing the avatar.
     
  3. Valter

    Valter Active Member

    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.
     
  4. Mike

    Mike XenForo Developer Staff Member

    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.
     
    Valter likes this.
  5. Valter

    Valter Active Member

    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?

     
  6. Mike

    Mike XenForo Developer Staff Member

    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.
     
    Valter likes this.
  7. Valter

    Valter Active Member

    Updated.

    Thanks. :)
     

Share This Page