Skip to main content

MultiPHP Manager Exception Error

Comments

6 comments

  • cPanelKenneth
    At a guess I'd say the ownership, permissions, or file attributes are wrong. When we make changes to files controlled by a non-privileged user, we do so as the user. Therefore if ownership, permissions, or file attributes would prevent the user from changing a file, it will cause an error. On the file in question: 1. What is the output of `ls -lah /home/user/public_html/.htaccess`? 2. What is the output of `lsattr /home/user/public_html/.htaccess`?
    0
  • nickNix

    root@server [~]# ls -lah /home/user/public_html/.htaccess -r--r--r--. 1 user user 15K Jan 29 20:03 /home/user/public_html/.htaccess

    root@server [~]# lsattr /home/user/public_html/.htaccess -------------e- /home/user/public_html/.htaccess
    0
  • JacobPerkins
    Hi, Yep, as Ken suggested, your .htaccess file is not writable (444 perms). You'll need to make this file at least 644 permissions to give the owner write access to it.
    0
  • digitaliway
    I have the same issue, but need to make this change on 80 domains so is there an automated way to update the htaccess for all domains to 644?
    0
  • cPanelMichael
    I have the same issue, but need to make this change on 80 domains so is there an automated way to update the htaccess for all domains to 644?

    Hello @digitaliway, You can use a command like this to list all .htaccess files under /home without 0644 permissions:
    find /home -type f ! -perm 0644 -name .htaccess
    You could then run the command again, adding an exec action (e.g. -exec chmod 644 {} \;) to change the permissions on all files in the output. However, I don't recommend running such a command because it's possible permissions are not set to 644 for a valid reason (e.g. the account is suspended). Instead, you may simply want to review each .htaccess file in the output from the initial command to determine if you should change the permissions. Thank you.
    0
  • digitaliway
    thank you for the command. I know each of these clients individually on the server so I know we are good to go with permissions. I needed to implement PHP-FPM and saw no other way but to specify php56 and then implement the PHP-FPM to ON. I used the below command after looking at yours and it work fine: find /home/*/public_html -maxdepth 1 -type f ! -perm 0644 -name .htaccess -exec chmod 644 {} \;
    0

Please sign in to leave a comment.