Website installed files get wrong permissions?

Discussion in 'Installation/Configuration' started by Taleman, Oct 23, 2017.

  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Somehow today when installing plugins to Joomla 3.8.1 the installed files get wrong permissions and the plugin does not work. Error log shows
    Group has no rights. When I correct them with chmod g+rx the plugins starts working.
    I tested on another server, where Ispconfig is older version. There this problem does not appear.
    I do not see what else is different with these servers, so is it possible ISPConfig 3.1.7p1 somehow breaks installing files and prevents the file permissions to be set as needed?
    It seems this problem affects all sites on this problematic server, and doing chmod g+rx to all the installed files fixes it. Also, seems every Joomla plugin we tried does this same thing, so likely the plugin installation file is not at fault. I checked vhost, there the user and group are correct. Also ISPConfig settings for site are OK as far as I can see, and have not been changed recently.

    (END)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    My guess is that the umask on this system is set wrong. How exactly did you install these files on your server? Did you upload them with FTP?
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Trying to figure out how to see umask used by site. Root umask is OK.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It is possible that the umask is set somewhere in the apache config files. Try e.g.:

    grep -R umask /etc/apache2/

    and in case you uploaded the site files with ftp then the umask is set in the pure-ftpd config files.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Uploaded file with FTP to the site. The file does have read for group.
    This site does not have shell user, only the FTP-user.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The shell user of the sites does not matter as you did not upload the file with that shell user. You want the files uploaded by FTP to have r+x instead of r only? Then change the umask in the pure ftpd config file and restart pure-ftpd.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The problem is group has no rights, not even read. Something is messing up the file creation.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    How did you create or upload the affected files?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The files are installed by Joomla. They are Joomla plugins or components. The files are installed on disk, but group has no rights. Seems the problem is in Joomla, but not when running on older ISPConfig.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess ISPConfig is not related to this as ISPConfig does not set the umask. Did you check / set for the umask setting in the apache config as I suggested in #4?
     
  12. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Which Joomla! version are you using? How do you upload the setup file to Joomla!? Which php mode are you using?
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I wrote Joomla version at first post, latest Joomla 3.8.1.
    Joomla has a mechanism for installing components, it downloads the intallation file itself and unpacks it. PHP mode is Fast-CGI.
    I have checked umask is not mentioned anywhere in /etc/apache.
    However, PHP5 settings mention session.save_path and MODE which is 600 by default. Like the file permissions that are now set.
    I suspect the apache2 or PHP5 upgrade on 15th October is the cause of this problem. Yesterday was the first time new Joomla components were installed since that upgrade. I'll try to set the umask for apache or something.
     
  14. HSorgYves

    HSorgYves Active Member HowtoForge Supporter

    Which extension did you install? Maybe it's only that extension that is broken...
     
  15. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The problem was with all Joomla components tried.
    I have now discovered that changing PHP mode from Fast-CGI to PHP-FPM fixes this issue. Fast-CGI has been used for months and has worked. I suspect the Debian upgrades on 15th this month did someting that broke Fast-CGI with Joomla.
    I even managed to create a PHP script to show what umask was (022) and create a file. The created file was with correct permissions and permissions could be changed to anything, even before I changed PHP mode.
    If I can figure out what debian package to blame I will file a bug report.
     

Share This Page