Get a free website with any plan

See how
HOSTING

File permissions

Last updated

IN SHORT

File permissions on Flashcloud hosting control who can read, write, or execute a file. The defaults are 755 for directories and 644 for files, applied automatically when you upload via FTP or the file manager. Wrong permissions, especially 777, are a common cause of sites failing to load or uploads failing.

File permissions control who can read, write, or execute files on your hosting account. Setting them wrong is a common cause of "site won't load" or "uploads fail" issues.

The defaults

For typical web hosting:

  • Directories: 755 — owner can read/write/execute, others can read/execute (i.e., enter the directory).
  • Files: 644 — owner can read/write, others can read.

If you upload via FTP or use the file manager, files come out at these defaults automatically. You usually don't need to think about it.

Changing permissions

In the portal:

  1. Go to Services → click hosting → Files tile.
  2. Right-click a file or folder → Change permissions.
  3. Set the value (or use the read/write/execute checkboxes for owner/group/other).
  4. Save.

Or use FTP — most clients (FileZilla, Cyberduck) have a "File permissions" right-click option that does the same thing.

Common values

  • 755 — directories, executables, scripts.
  • 644 — regular files (HTML, CSS, JS, images, PHP files).
  • 600 — sensitive files like wp-config.php (only owner can read).
  • 400 — even more locked down (read-only by owner).
  • 777 — read/write/execute by anyone. Almost never the right answer — we'd reject it as a security risk on most managed hosting.

When you'd change them

  • WordPress hardening: setting wp-config.php to 600 or 400 to keep credentials private.
  • Cron scripts: a custom shell script run from cron needs 755 (executable) instead of 644.
  • Upload directories: WordPress, Drupal, etc. need writable upload folders — usually 755 works because PHP runs as your account user.
  • Fixing post-restore permissions: if you restored files from a backup or migrated from another host, permissions can be wrong; resetting to 755/644 across the board often fixes it.

"My site shows 500 Internal Server Error"

Permissions are a common cause. If a directory is 777 or a CGI script is 644 (not executable), the server may refuse to serve it. To bulk-fix:

In the portal's File Manager, you can select multiple files/folders and set permissions in one go. Or via SSH on plans that support it:

find /home/youraccount/public_html -type d -exec chmod 755 {} +
find /home/youraccount/public_html -type f -exec chmod 644 {} +

This sets every directory to 755 and every file to 644 — the standard defaults. Be careful if you have specific files that need different permissions (executables, sensitive configs).

Why 777 is bad

777 means anyone with shell access to the server (including, in some shared-hosting scenarios, other accounts) can read AND modify the file. For a web-accessible directory or script, it's also an open invitation for any compromised script anywhere on the server to write malware to your site.

There's almost never a real need for 777 in modern web hosting. If a tutorial or plugin tells you to chmod 777, it's probably wrong — try 755 first.

Power-user note

The file permissions system is chmod octal: each digit is owner/group/other, where 7 = read+write+execute, 6 = read+write, 5 = read+execute, 4 = read, 0 = nothing. So 644 is "owner read+write, group read, other read." Most CMS docs assume you know this; the file manager in the portal abstracts it away with checkboxes.

Common questions

Why do I get a 500 internal server error after restoring a backup?

Restored or migrated files often come in with the wrong permissions, and that's a common cause of 500 errors. Reset directories to 755 and files to 644 across the site: in the portal's File Manager you can select everything and set permissions in one go, or run the two find/chmod commands over SSH on plans that support it.

What permissions should wp-config.php have?

Set it to 600 so only the owner can read it, since it holds your database credentials. On plans where you want it locked down even further, 400 works too, read-only by the owner.

Is it ok to just chmod everything to 777?

No. 777 lets anyone with shell access read and modify the file, and on a web-accessible script it's an open door for a compromised script anywhere on the server to write malware to your site. There's almost never a real need for it. If a tutorial or plugin tells you to chmod 777, try 755 first.

Why can't my cron script run?

A custom shell script triggered by cron needs to be executable, so it should be set to 755 instead of the regular file default of 644. Regular files like HTML, CSS, and PHP stay at 644 since they don't need to execute.

How do I change file permissions without SSH?

Use the portal: go to Services, click your hosting, open the File Manager tile, then right-click the file or folder and choose Change permissions. You can set the numeric value directly or use the read, write, execute checkboxes for owner, group, and other, then save.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.