Guide FTP & File Management

How to change file permissions

Setting the right permission number on a file or folder using your FTP client or file manager, and the one number to never use.

Updated 6 min read Beginner

If a page shows a permission-denied error, or an upload will not run as expected, the fix is often a single permission number set incorrectly on one file or folder. This guide covers finding and changing that number using either an FTP client or the file manager in your control panel — both reach the same setting, so use whichever you already have open.

Not sure what the numbers mean?

This guide is about changing a permission value you already know you need. If you want to understand what 755 and 644 actually represent first, read file permissions, explained.

Using an FTP client

  1. Connect with FTP

    Open your client and connect to your hosting account as usual. Navigate to the file or folder whose permission needs changing.

  2. Find the current permission number

    Right-click the item and look for an option along the lines of "File permissions" or "File attributes". Most clients, including FileZilla, show the current value as a three-digit number in the dialogue that opens, alongside tick boxes for read, write and execute against owner, group and other — the boxes and the number represent the same thing, just two ways of showing it.

  3. Set 755 for folders or 644 for files

    Type the new value directly into the numeric field if one is offered — it is faster and less error-prone than ticking nine separate boxes. Use 755 for a folder, 644 for a file, unless you have a specific, documented reason to use something else.

  4. Decide whether to apply it recursively

    If you are changing a whole folder and everything inside it, most clients offer a "recurse into subdirectories" option, sometimes with separate settings for files and folders within it. Use this when an entire folder's contents have the wrong permission; leave it unticked when you only mean to change the one item you selected.

Using the file manager in your control panel

If you would rather not open a separate FTP client, the file manager built into your control panel does the same job from a browser. Select the file or folder, look for a "Permissions" or "Change permissions" option in the toolbar or right-click menu, and enter the new value the same way. This is often the quicker option for a single, one-off change.

SituationSet to
A folder755
A regular file — HTML, CSS, JS, images, config files644
A script that specifically must run as a program755, and only if your application's own documentation says so
Never set 777 to make an error go away

777 gives every user and process on the server full read, write and execute access, which removes the protection permissions exist to provide. If setting 755 or 644 does not clear the error you are seeing, the permission number was very likely not the actual cause, and it is worth checking ownership, a corrupted .htaccess file, or a quota issue instead of opening the file up completely. Fixing permission-denied errors covers those other causes.

What the tick boxes mean, if your client shows them

Some clients present permissions as a grid of tick boxes — read, write and execute across owner, group and other — rather than, or alongside, the numeric field. This is the same setting shown a different way: ticking read and write for the owner and read only for group and other produces exactly 644, and it can be a useful way to double-check a numeric value you have typed in before confirming, particularly if you are new to what the digits mean. See file permissions, explained if the owner, group and other model itself is not yet familiar.

Changing permissions on a lot of files at once

A common situation is a whole site uploaded with folders at 644 and files at 755 — the reverse of what they should be, which happens when files were compressed and extracted on a computer with different default settings. Rather than fixing each item individually:

  • Select the top-level folder and use the recursive option, applying 755 to folders and 644 to files if your client lets you set the two separately in the same operation.
  • If your client only offers a single recursive value rather than separate ones for files and folders, do folders and files in two passes: select all folders and set 755, then select all files and set 644.
  • On a very large site, this can take a few minutes to complete — let it finish rather than disconnecting partway through, which can leave permissions in a mixed and confusing state.

Checking it worked

Reload the affected page after making the change. If the permission was genuinely the cause, the fix is immediate — there is no caching or delay involved the way there is with DNS changes. If the error persists exactly as before, permissions were not the actual problem, and it is worth checking the file's ownership and its contents for the real cause rather than repeating the same change with a different number.

For the small number of cases where a script genuinely needs to be run directly rather than just read, setting file permissions safely covers the more advanced situations this guide does not.

Related reading