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
USERNAMEwith the actual cPanel username.