How to change file and folder permissions

Permissions control who can read, change, or run a file. If a website shows a Forbidden error or cannot save uploads, permissions are a common cause. Wrong permissions can also make a site less secure, so change them carefully.

Steps

If your cPanel uses the Jupiter theme

  1. Log in to cPanel and open Files > File Manager.
  2. Browse to the file or folder you want to change and click it once.
  3. Click Permissions in the toolbar. A box shows the current permissions as three groups: User, Group, and World.
  4. Tick the boxes you want or type the number directly. The number shown for files by default is usually 644, and folders are usually 755.
  5. Click Change Permissions.

If your cPanel uses the Meridian theme

  1. Log in to cPanel and click Files in the left sidebar.
  2. Open the File Manager tab, browse to the file or folder, and select it.
  3. Click Permissions. A column also shows the current permission number.
  4. Set the access rights you need. Typical safe values are 644 for files and 755 for folders.
  5. Save the change.

Why permissions matter

Every file on your hosting account has an owner and a set of permissions. When a website works normally, you rarely need to touch them. Problems usually appear after you upload files from another computer or restore a backup, because they may arrive with different settings. Setting them back to the normal values fixes most 403 Forbidden errors and some upload problems.

Tips and troubleshooting

  • Typical safe values are 644 for files and 755 for folders. These let the website read them but only the owner change them.
  • Never set files or folders to 777. This lets anyone on the server write to them and is a common way websites get hacked.
  • Some applications ask for a folder to be writable for uploads. Follow the application's instructions and use the lowest value that works.
  • Folders protected with Directory Privacy may need 0700.
  • If you made a change and your site stops working, change the value back to the default.
  • If you are not sure, contact support before changing permissions on important files.

Need help? Contact Barrett IT Support at support@barrettit.com or call 888.374.4632.

  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

How to use the File Manager: browse, upload, and extract files

File Manager is like Windows Explorer or Finder for your hosting account. You can use it to...

Where do my website files go? Understanding public_html

Knowing where to put files makes it much easier to fix problems and keep things tidy. This...

How to create an FTP account

An FTP account lets a person or program upload files to your website from a program on their...

How to connect to your website with an FTP program

FTP programs such as FileZilla or Cyberduck make it easy to upload many files at once. This...

How to check how much disk space you are using

Your hosting plan includes a set amount of storage. If you use it all, you cannot save files, and...