Fix cPanel Website Showing Index Of / 404 Despite Files Existing Print

  • Permissions & Filesystem Fix
  • 0

Resolves cases where a cPanel website shows directory listing (“Index Of”) and returns 404 errors for existing files.
Root cause is filesystem-level corruption such as ACLs, immutable flags, or permission inheritance issues.
This fix safely resets ACLs, attributes, ownership, and permissions for the affected account’s public_html without impacting WHM, mail, or other services.


Command

setfacl -Rb /home/USERNAME/public_html
chattr -Ri /home/USERNAME/public_html
chown -R USERNAME:USERNAME /home/USERNAME/public_html
chmod -R u+rwX,go+rX /home/USERNAME/public_html

Replace USERNAME with the actual cPanel username.

 


Was this answer helpful?

« Back

Chat with us
Need help? Chat with us!