Sometimes when i deploy via tools like ruby’s capistrano, there is a certain tendency to get permissions brutally wrong.
and also very easy to encounter the 403 forbidden error “you don’t have permission to access on this server”
For apache to render web files, it require read permissions.
I ran into this and used this commands to resolve the matter: ![]()
sudo chmod -R a+rx ~/public_html # this is the web site folder sudo chmod a+rx ~ # this is current or deployment user home directory
the first ensures that public_html directory is readable and accessible to all users on the system.
The next command sets current or deployment user’s home directory to be readable and accessible to all.
If you add more directories for additional virtual domains later, run that first command again to make sure the new directories are accessible as well.