Are you stuck with the error ‘SFTP error #3 permission denied’? We can help you in fixing it.
Usually, this error occurs mainly due to permission errors.
At Bobcares, we often receive requests to solve SFTP errors as part of our Server Management Services.
Today, let’s discuss this error in detail and see how our Support Engineers fix it easily.
Why SFTP error #3 permission denied?
We always suggest our customers to transfer files via SFTP due to its security features.
However, we have come across many errors related to SFTP. One among them one is SFTP error #3 permission denied.
We’ve seen this error occurring due to problem with the permissions or due to file transfer resume option.
Among these both, the most common cause is permission error.
How we fix this permission denied error?
Recently, one of our customers approached us with a permission denied error. He was using WinSCP and whenever he tries to replace/overwrite a file, he was getting the following error.
Cannot create remote file 'filename'.
Permission denied.
Error code: 3
Error message from server: Permission denied
WinSCP or Windows Secure Copy is a free and open-source SFTP or SCP client for Microsoft Windows.
Our Support Engineers checked and found out permission errors. This occurs mainly when the user does not have the create permissions to the folder.
So, WinSCP fails to create a temporary file for the transfer. Let’s check the major two ways we follow to resolve this error.
1. Write permissions
As we have already said, these errors occur mainly due to some permission errors. So, we grant the user or group with write permissions to the folder.
For instance, if Ubuntu is the user, then we need to execute the below command in the folder on the Ubuntu server.
sudo chown -R ubuntu:ubuntu .
2. Disable transfer to temporary files
WinSCP supports resuming file transfers with SFTP and FTP. It will store the file being transferred to a temporary filename first.
And, renaming it to the target name occurs only once the transfer successfully finishes.
But, disabling this transfer to a temporary file will resolve the permission denied error.
For that, we follow the below steps:
- Firstly, select Preferences.
- Then, navigate to Transfer > Endurance page.
- After that, under the “Enable transfer resume/transfer to a temporary file name for” section, we choose the Disable option.
[Still confused with this error?- We’ll help you.]
Conclusion
In short, the SFTP error #3 permission denied occurs due to incorrect permissions of files/folders. Today, we have discussed this error in detail and saw how our Support Engineers easily fix it.
Thank you very much. I don’t know much about linux commands, this post was very usefull to me. I could not download some files from a Ubuntu server at AWS.
Hello Elidio,
Can you please verify if there are any restrictions at AWS? If you still have errors and need help, we’ll be happy to talk to you on chat (click on the icon at right-bottom).
Hi, I have similar problem, can you please help?
Hello,
Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).
Huge thanks, the first solution work immediatly.