SOLVED Error changing PHP version

kernow

Well-Known Member
Jul 23, 2004
970
35
178
cPanel Access Level
Root Administrator
Were unable to change the PHP version on one domain name. The error appears to relate to a .htaccess file. The .htaccess file has correct permissions (0644) and ownership.

Code:
Error: (XID h5ymd3) 1 error occurred: Error #1: The system failed to apply the “PHP” version to “example.com”: Cpanel::Exception::IO::FileCreateError/(XID pm97cr) The system failed to create the file “/.htaccess.lock” (as EUID: 823, EGID: 834 834) because of the following error: Permission denied at /usr/local/cpanel/Cpanel/SafeFile.pm line 376. Cpanel::SafeFile::_safelock("/.htaccess") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 557 Cpanel::SafeFile::_safe_open(undef, 66, "/.htaccess", CODE(0x39e6098), "safesysopen") called at /usr/local/cpanel/Cpanel/SafeFile.pm line 214 eval {...} called at /usr/local/cpanel/Cpanel/SafeFile.pm line 213 Cpanel::SafeFile::safesysopen(undef, "/.htaccess", 66, 420) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 128 Cpanel::SafeFile::safesysopen_no_warn_on_fail(undef, "/.htaccess", 66, 420) called at /usr/local/cpanel/Cpanel/Transaction/File/Base.pm line 130 Cpanel::Transaction::File::Base::new("Cpanel::Transaction::File::Raw", "path", "/.htaccess", "permissions", 420, "restore_original_permissions", 1) called at /usr/local/cpanel/Cpanel/WebServer/Supported/apache/Htaccess.pm line 190 Cpanel::WebServer::Supported::apache::Htaccess::_internal_set_handler(Cpanel::WebServer::Supported::apache::Htaccess=HASH(0x398f3a8), "userdata",
 

DennisMidjord

Well-Known Member
Sep 27, 2016
227
27
28
Denmark
cPanel Access Level
Root Administrator
What are the permissions for /home/userdir and subfolders?
Looking further at the error, it seems like it can't create the .htaccess.lock file. Something could seem like the user can't write in the directory.