How to Fix “Permission Denied” Errors in FTP and SFTP
A “Permission denied” error in FTP or SFTP can be confusing because you may be successfully connected to the server and able to browse its files. The error only appears when you try to upload, overwrite, rename, delete or create something.
That distinction is important. If you can connect and browse the server, the problem is usually not your hostname or network connection. It is more likely related to file permissions, directory permissions, ownership, account restrictions or the destination path.
This guide explains the most common causes and how to diagnose them without blindly changing permissions across your server.
What Does “Permission Denied” Mean?
A remote server decides which operations your account is allowed to perform. Being able to connect does not automatically give you permission to modify every file or directory you can see.
For example, your account might be allowed to:
- List files in a directory
- Download files
while not being allowed to:
- Upload new files
- Overwrite existing files
- Delete files
- Rename files or folders
- Create directories
- Change file permissions
The exact error message varies between FTP servers, SFTP servers, hosting environments and clients, but the underlying issue is usually that the server rejected an operation your account attempted to perform.
1. Check That You Are Uploading to the Correct Directory
Before changing any permissions, confirm your remote path.
Hosting accounts often contain several directories, but only specific locations are intended for website files. Common web-root names include:
public_htmlwwwhtdocshttpdocs
Your provider may use a different structure.
You might be able to browse a parent or system-controlled directory without having permission to upload into it. Moving to the correct website or account directory may solve the problem without changing any permissions.
2. Check the Directory Permissions
Uploading a file requires permission on the destination directory. This is separate from the permissions of the file being uploaded.
On Unix-like servers, permissions are generally divided among:
- Owner — the user that owns the file or directory
- Group — users belonging to the assigned group
- Others — everyone else
The available permission types are:
- Read (r)
- Write (w)
- Execute (x)
For directories, the execute permission is especially important because it controls whether the directory can be traversed.
3. Understand Common CHMOD Values
Permissions are frequently represented by three-digit numbers such as 644 and 755.
644
Owner can read/write; others can read
Regular website files
755
Owner can read/write/execute; others can read/execute
Directories and executable files where appropriate
600
Only owner can read/write
Private files
700
Only owner has full access
Private directories or scripts
777
Everyone can read/write/execute
Usually should be avoided
Do not assume that changing a directory to 777 is the correct solution to a permission error. It grants very broad access and can introduce a security problem without addressing the real cause.
We cover these values in more detail in our guide to FTP file permissions and CHMOD.
4. File Ownership Can Cause Permission Problems
Correct-looking CHMOD values do not guarantee that your FTP or SFTP account can modify a file.
Ownership matters too.
For example, a file might have been created by:
- A different server account
- A deployment process
- A web application
- A system or administrative user
- A hosting control-panel process
Your FTP/SFTP account may therefore be able to read the file but not overwrite or delete it.
If one group of files produces permission errors while other files in the same area work normally, ownership is worth investigating.
Can FTP or SFTP fix file ownership?
Usually not. Changing ownership typically requires appropriate server-level privileges. On managed or shared hosting, you may need to use the hosting control panel or contact the hosting provider.
5. Check Whether You Can Create a New File
A simple test can help narrow down the problem.
Try creating a new directory or uploading a small new file into the affected directory.
If creating a new file succeeds but overwriting an existing file fails, the issue may involve the existing file's permissions or ownership.
If creating anything fails, the destination directory itself may not be writable by your account.
6. Check Whether the Server Restricts Your Account
FTP and SFTP accounts can be deliberately restricted to particular directories or operations.
A hosting provider might configure an account so that it:
- Starts inside a specific home directory
- Cannot access directories outside that location
- Has read-only access
- Cannot modify certain system files
- Cannot change permissions
These restrictions cannot necessarily be bypassed by changing CHMOD values. They may be enforced by the FTP service, SSH configuration, filesystem ownership or hosting platform.
7. Check Available Disk Space and Quotas
Not every failed upload that looks like an access problem is caused by Unix permissions.
If the hosting account has reached its storage quota, the server may refuse new uploads or file modifications. Depending on the server and client, the resulting message may not clearly explain that storage is the underlying problem.
Check your hosting control panel for:
- Disk usage
- Account storage quota
- Inode or file-count limits
- Temporary storage limits
This is especially worth checking when permissions appear correct and uploads previously worked.
8. Check the File or Directory Name
Some servers and applications impose restrictions on filenames, paths or special characters.
If the error affects only one particular file, try uploading a small test file with a simple name such as:
test.txt
If that succeeds, inspect the original filename and path rather than immediately changing server permissions.
9. Understand the Difference Between FTP and SFTP Permissions
FTP and SFTP may expose similar file-management operations, but they reach the server through different protocols.
FTP is handled by an FTP service, while SFTP normally operates through SSH. A server can therefore give the same person different capabilities depending on which account or protocol is being used.
If you are unsure about the protocol itself, see our FTP vs SFTP vs FTPS comparison.
10. Avoid Using 777 as a General Fix
Searching for a permission error often leads to advice telling you to run CHMOD 777 on the affected file or directory.
That is not a good general troubleshooting strategy.
777 gives read, write and execute permissions to the owner, group and others. Depending on the server configuration, this can expose files or directories to modification by processes or users that should not have that capability.
It may also fail to solve the problem when the actual cause is ownership, an account restriction, a read-only filesystem or another server policy.
Use the minimum permissions required for the application and hosting environment.
Troubleshooting Permission Denied Step by Step
If you encounter a permission error, check the problem in this order:
- Confirm that you are in the correct remote directory.
- Try uploading a small new test file.
- Check whether you can create a directory.
- Check the destination directory permissions.
- Check the existing file's permissions if only overwriting fails.
- Investigate ownership if permissions appear correct.
- Check hosting storage and account quotas.
- Confirm that the FTP/SFTP account is allowed to modify the location.
- Contact the server administrator or hosting provider if ownership or server policy needs to be changed.
This approach is safer than immediately applying broad permissions across the website.
Managing Remote Files with BrowserFTP
BrowserFTP provides browser-based access to FTP, FTPS and SFTP servers, including common remote file-management operations supported by the connected account.
However, BrowserFTP cannot override permissions imposed by the remote server. If the server account does not have permission to modify a file or directory, the operation should remain blocked.
This is an important security boundary: a file-transfer client can request an operation, but the remote server ultimately decides whether that operation is permitted.
If you are just getting started, see How to Use FTP in a Browser or our SFTP Client in Browser guide.
Final Checklist
When FTP or SFTP says “Permission denied,” remember that a successful connection only proves that authentication worked. It does not prove that your account has write access everywhere on the server.
Start with the destination path and directory permissions, then investigate file permissions, ownership, account restrictions and hosting quotas. In most cases, identifying exactly which operation is being denied will lead to the cause much faster than changing permissions indiscriminately.
Common Questions Asked
Why does FTP say permission denied when uploading a file?
Your FTP account may be able to connect and browse files without having write permission in the destination directory. Directory permissions, ownership, account restrictions or hosting quotas can all cause an upload to be rejected.
Why can I download a file but not overwrite it?
Read and write permissions are separate. Your account may have permission to read the file but not modify it. The existing file may also belong to another server user even if its permissions initially appear correct.
Should I use CHMOD 777 to fix FTP permission errors?
Generally, no. CHMOD 777 grants very broad permissions and can create a security risk. It may also fail to solve errors caused by ownership, account restrictions or server configuration. Use only the permissions actually required.
What permissions should website files and folders have?
644 is commonly used for regular website files and 755 for directories, but the correct permissions depend on the server, ownership and application configuration. Do not change permissions blindly without understanding the hosting environment.
Can BrowserFTP bypass a server permission error?
No. FTP and SFTP clients must respect the permissions enforced by the remote server. BrowserFTP can perform file operations that the connected account is authorized to perform, but it cannot override server filesystem permissions or account restrictions.