You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe
set
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
✅ Fix
Run these commands as root or via SSH:
chmod 711 /home/anichesol
chmod 755 /home/anichesol/domains
chmod 755 /home/anichesol/domains/aniche-solutions.com
chmod 755 /home/anichesol/domains/aniche-solutions.com/public_html
chmod 644 /home/anichesol/domains/aniche-solutions.com/public_html/.htaccess
🟢 Explanation:
711 → allows owner full access, others can only traverse (x)
755 → readable and traversable by Apache
644 → .htaccess readable by Apache
🔧 Also fix ownership
Sometimes .htaccess or folders are owned by root, which breaks things.
Run:
chown -R anichesol:anichesol /home/anichesol/domains/aniche-solutions.com
(If you’re using PHP-FPM under apache group, then use anichesol:apache instead.)
🔁 Restart Apache
systemctl restart httpd
✅ After this
Revisit your site — it should load fine.
If it still shows “Forbidden”, run:
ls -ld /home/anichesol /home/anichesol/domains /home/anichesol/domains/aniche-solutions.com /home/anichesol/domains/aniche-solutions.com/public_html
Then paste that output here — I’ll tell you the exact permission that’s wrong.
Comments
Post a Comment