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
![cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache image 5 - cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-5.png?resize=598%2C205&ssl=1)
so when the webserver was switched from LiteSpeed to Apache, files were password protected again:
![cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache image 6 1024x557 - cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-6.png?resize=736%2C400&ssl=1)
I removed the password protection from cPanel > Directory Privacy for the public_html folder
![cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache image 8 - cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-8.png?resize=736%2C445&ssl=1)
but the directory is still protected:
![cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache image 7 - cPanel Directory Privacy goes rogue after changing web server from LiteSpeed to Apache](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/05/image-7.png?resize=590%2C399&ssl=1)
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.