Cannot change user PHP version in WHM

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
When trying to change certain users PHP version in WHM multi PHP manager it comes up with a long string of Errors. Ill show them below. let me know if anybody knows what to do with this , thank you.

Error: (XID ut4ajn) 1 error occurred: Error #1: The system failed to apply the “PHP” version to “domain.com”: Cpanel::Exception::IO::FileLockError/(XID r3ranr) The system failed to lock the file “/home2/username/public_html/.htaccess” (as EUID: 1236, EGID: 1238 1238) because of the following error: Permission denied at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 165. Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/home2/username/public_html/.htaccess", "permissions", 420, "restore_original_permissions", 1) called at /usr/local/cpanel/Cpanel/WebServer/Supported/apache/Htaccess.pm line 191
 
Last edited by a moderator:

quietFinn

Well-Known Member
Feb 4, 2006
1,648
323
438
Finland
cPanel Access Level
Root Administrator
Seems you must change permissions of file /home2/ninisdaycare/public_html/.htaccess, I belive 644 would be right.
 

vacancy

Well-Known Member
Sep 20, 2012
523
202
93
Turkey
cPanel Access Level
Root Administrator
Hi

Yes, as quietFinn said, your .htaccess file has a write permission problem. When you want to change the php version, cpanel adds code to the .htaccess file, if there is a problem with the write permissions of your .htaccess file, the operation will not be performed.

After making the chmod settings, also check your ownership settings.

You can fix the ownerships if you run chown -R username:username /home2/username/public_html/.htaccess command.
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
9,737
1,520
313
cPanel Access Level
Root Administrator
Hey there! This looks like an issue with the permissions on either /home2/username, /home2/username/public_html, or the .htaccess file itself. Can you check the permissions and ownership of those areas and make sure they are correct?
 

nyjimbo

Well-Known Member
Jan 25, 2003
1,135
1
168
New York
Okay thank you it looks like that was it. For some reason a few of the htaccess files are also screwed on other accounts. I'm not sure why but they had root.root as ownership