My website says "Permission denied" or won't display
Fixing file and folder permissions after an upload or a restore.
Every file and folder in your account has a permission setting controlling who may read, write, or run it. If your files were uploaded through an FTP program, copied from another host, or restored from an older backup, they can occasionally end up with a permission setting that stops your own website from displaying.
Steps
- Click File Manager under Files in the sidebar and browse to the folder or file causing the problem, usually your domain's document root or the specific file mentioned in an error.
- Check the Mode column next to it. As a general rule, ordinary files should read
644and folders should read755. A file or folder set to something more restrictive, such as600or700and owned in a way your web server can't read, is a common cause of this exact problem. - Type the correct mode into the box next to the file or folder and click Set.
- If many files across a folder are affected (for example, after restoring a large backup or extracting an archive), you may need to correct several files this way, or a specific application file mentioned in your error log first, see the article on server errors and blank pages for how to check that.
Tip: avoid setting a mode of
777 to make an error go away. It works because it opens the file up to everyone, which is a security risk rather than a fix, correct the actual mode instead.