cPanel Directory Privacy  goes rogue after changing web server from LiteSpeed to Apache

At one point cPanel user has password-protected the public_html folder using the cPanel Directory Privacy option. Then He removed it at one time, however, cPanel didn’t rebuild the cache files for some reason inside userdata folder: /var/cpanel/userdata/$USERNAME

image 5 - cPanel Directory Privacy  goes rogue after changing web server from LiteSpeed to Apache

so when the webserver was switched from LiteSpeed to Apache, files were password protected again:

image 6 1024x557 - cPanel Directory Privacy  goes rogue after changing web server from LiteSpeed to Apache

I removed the password protection from cPanel > Directory Privacy for the public_html folder

image 8 - cPanel Directory Privacy  goes rogue after changing web server from LiteSpeed to Apache

but the directory is still protected:

image 7 - cPanel Directory Privacy  goes rogue after changing web server from LiteSpeed to Apache

Restarted Apache webserver with the command:

service httpd restart

After checking files in the userdata folder I noticed that they weren’t updated even after restarting apache:

ll /var/cpanel/userdata/$USERNAME

So I used the following sripts to regenerate userdata cache and rebuild apache conf files:

/scripts/updateuserdatacache
/scripts/rebuildhttpdconf
service httpd restart

The website was then made available again.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.