


But if you cannot even connect via SFTP or SSH, you might be getting a similar error message that reads “SFTP permission denied (public key)”. Generally, you are successfully connecting via SFTP or SSH with the same user, but you can’t modify, change, or overwrite the file via SFTP.

In Windows, while using an SFTP client, like WinSCP or FileZilla, the message looks like this: Regardless of which SFTP client you use, when you SFTP into a server and try to replace, edit, delete, or overwrite a file or directory, you get “an SFTP permission denied” error message.Īn example: Cannot create remote file 'ver'.Įrror message from server: Permission denied By default, AWS doesn’t grant “root” SSH access to the EC2 instances due to security’s best practices. We will use the default user “ubuntu” and add a new sftp01 user. To illustrate a clearer picture of the “sftp permission denied” error scenario, we’ll use an AWS EC2, Ubuntu (Focal-20.04-amd64-server). First, we’ll learn to check and update the user/group file/folder permissions, and second, we’ll figure out why we are getting authentication/access permission denied due to the public key. In this post, we’ll go through the two cases. Another similar error message is the “SFTP permission denied (public key),” where you won’t even be able to access the server via SFTP or SSH. Generally, you would still have access to the SFTP server via SSH, but you won't be able to change a specific file or directory. Although SFTP is an easy-to-use and secure file transfer protocol, many people frequently face one of the most infamous SFTP errors, the “SFTP permission denied.”Īs the error output reads, this issue is due to the lack of permissions to access a file or directory.
