Permission denied - Error code 3

Advertisement

guest
Guest

Permission denied - Error code 3

Can anyone point me in the right direction to solve my problem?

When I try to transfer a file I get the following error:
Permission denied
Error Code: 3
Error message from server: Permission denied
Request Code: 3

Advertisement

dlaws
Guest

Permission denied Request code

I have the same problem as what you are facing and i don't know what to do.

I found the post below and it seemed to have worked for the guy asking the question, it may work for you? I've not had any luck with it, please let me know if you crack it.

<invalid hyperlink removed by admin>

Regards
d

gate4Win
Joined:
Posts:
2
Location:
Gate - Riviere-du-Loup, Quebec (Canada)

Permission denied - Error code 3

Just follow the each step and you will get it fixed:
  1. Open WinSCP
  2. Bottom-left --> put a check on Advanced options
  3. Bottom of white window (Just above Advanced options) --> Left click on Preferences
  4. Now move to your right in line 2/3 of the way --> Left click on the Preferences "Radio-type" Button
  5. Now in the "Confirmations" box, 4th item from the top, Transfer resuming remove the 'check-mark'
  6. Left-click on the OK Button -----> You're done ! Enjoy it
jga

gate4Win
Joined:
Posts:
2
Location:
Gate - Riviere-du-Loup, Quebec (Canada)

Permission denied - Error code 3

DLAWS: Please forget about the previous reply (Posted: 28 Sep 2007 05:46).

The problem is with permission security of your server. (My server ---> FreeBSD 6.2)

The only way I could sign-in and transfer/delete/etc.. files from/to my PC was to give "root" permission to login through SSH login. (Have to set PermitRootLogin yes) in sshd_config file.

No more "Permission denied - error code 3".

Gate

Advertisement

dceddy
Joined:
Posts:
1

Re: Permission denied - Error code 3

I'm having a similar problem to the prior report as shown on this attachment with no Request Code shown on the error message. I try to upload one file with no problem, but have this problem only on a new file as shown. both of these files are the same for permissions settings. I tried several times in case of any file corruption, but had the same issue every time.

Does anybody have any suggestions that we should try when this problem occurs?

Win SCP access problem.jpg

martin
Site Admin
martin avatar

Re: Permission denied - Error code 3

@dceddy: So do both files exist in the remote directory, with the same permissions? Or does the first file exist only and the second one (the one your get the error with) is new?

Advertisement

Guest

Both files do exist in the same root directory with the same permissions. One is old and one is new. But, I try to upload both to the same directory. The old one does upload to the server and overwrites the old existing file on the server, and the new one will not and has the error message. It is possible that the administrator of the webserver has recently changed something, and I will follow up on that, but I would like to have some idea of what could cause that.

Guest

We're having a similar problem. We can rename, delete and create. But when we overwrite, it seems to upload OK but we get error 3 saying upload "was successful, but error occurred while setting the permissions and/or timestamp"

The suggestion is to "turn off setting permissions or preserving timestamp" or we can "ignore permission errors"

Not sure what the best option is and the impact of each.

Permissions are fine, and the problem still occurs if we CHMOD 777. We can overwrite file just fine using the same user in FlashFXP.

audit.log and secure log are all green, no problems.

Running WinSCP Version 5.5.4. (Build 4433)
Server : Centos release 6.5 (Final)

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

@Guest: Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

marty
Guest

Error code 3

I could successfully transfer to HTML Document Root (/var/www/html owned by www-data) but
not to /usr/local/bin owned by root. Error code 3.

I was in www-data's group, but not in root. Added myself to root's group with 775 permission.

(DUH. What took me so long? Maybe we're ALL too busy lol.)

Advertisement

shamnas
Guest

use chmod

ssh to your server using putty or whatever..
chmod 777 <directory name>
and copy whatever you like
change the permissions back...

benjamin
Guest

i had the same message. It happens because my sftp server was full. I have solved my problem by removing files on my sftp server.

ngocht
Guest

I had the same problems. But i login by my personal account. So i try again by root account and it work :D

Advertisement

IC
Guest

a

try sudo chmod 777 /Directory-name in putty or tiger vNC
it worked for me

Guest

Re: Error code: 3 -while editing directories in aws

sudo chown -R -v ec2-user /var/www/ or sudo chown -R -v ubuntu /var/www/

CharlieL2017
Guest

Hey Can someone help US PLEASE IN NEED BAD

Hey Everyone our problem clearly is the same as other's on this site we bought a lapLeah Age 6 top from Dell ad it keep's Error: Permission to read and write N:\Temp fix remote folder to continue something on the lines of this How can we fix this problem without a operating system or Windows 10 please let me our email is charlielapoite@gmail.com I Miss my good laptop we are using our shitty slow one lol Please help

brockayers
Guest

Same issue

Hello, Im fairly new to Raspberry Pi, programming, and all this stuff.
I'm trying to copy a file from my Rpi to my computer via WINSCP. When I try to open the folder with the file in it, I get:
Permission denied.
Error code: 3
Error message from server: Permission denied
Could someone explain what I need to do to get permission??

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Same issue

brockayers wrote:

Hello, Im fairly new to Raspberry Pi, programming, and all this stuff.
I'm trying to copy a file from my Rpi to my computer via WINSCP. When I try to open the folder with the file in it, I get:...
Same answer: Start a new post and post a log file or at least a complete error message. Explain what do you mean by "open the folder with the file".

Guest

You should give all permission to that pertcular user in sudoers file and u have to give 777 permission to the folder to which you trying to copy the file.

6thPlaneta
Guest

Re: use chmod

shamnas wrote:

ssh to your server using putty or whatever..
chmod 777 <directory name>
and copy whatever you like
change the permissions back...
It's true.
for safety you can chmod 775 like this:
sudo chmod 775 /YOUR_DIRECTORY

FUM
Guest

The following worked for me

How the error occurred in my case was during a file transfer. I was wondering if I could transfer a file between two separate ftp sessions inside WinSCP.

How I resolved the file permission Error:

1- I renewed the session, where I got the permission Error, by pressing the button with the two opposing green arrows inside a folder icon (Refresh, Ctrl+R).
(Not sure if it made any difference but that is what I did).

2- Then I clicked on the folder icon where a downward green arrow is (Open directory/bookmark, Ctrl+O), which brought up the file path.

3- I selected the file path where I have my domains.

4- Clicked OK

Suddenly it worked again.

Advertisement

Hari Prasad Sala
Guest

Permission Denied

Please make sure that the folder in AWS Instance has required permissions.

That can be done by following command:
chmod 777 folder_name

Hope this helps...

vela
Guest

Previous "get" was removing file

I had a similar issue and was getting error code 3. Come to find out, my first "get" was actually removing the file from the SFTP and when I did my second call to the file, there was no file therefore throwing an error. To fix, I did the "get" then a copy from the target.

kenny117
Guest

WinSCP Permission Denied

I got the same error but what I did is that I passed the folder/file to the home directory(destination) then after that I used Putty to connect to that server and then I do a copy command to copied the folder to the specified location.

BrentBR
Joined:
Posts:
3
Location:
London, Canada

INTERMITTENT file copy failure (error code 3)

I'm running WinSCP 5.13.3
I have a script...
cd "C:\Program Files (x86)\WinSCP"
# WinSCP.com
# open "brassroots"
WinSCP.exe "brassroots" /defaults /synchronize // "C:\websites\brassroots\www" "/public"
My symptom is *intermittent*. I'm working with my isp but no resolution yet.
*SOMETIMES* WinSCP fails to copy a changed file to the server.
"Synchronize" recognizes the change. Manual file copy also fails. Diagnostic is:
Permission denied; Error code: 3; Error message from server (en-US): Permission denied
However, when a copy fails, I can still delete the file on the server and replace it!

This seems bizarre to me. How is it that with WinSCP if I cannot copy/replace a file, I can still delete/replace it? That is my puzzle. But the problem is intermittent.

My skill set is "kick it and see if it twitches". :-) I've boiled the issue down to this.
If you wizards can provide any insight I would really appreciate it.

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: INTERMITTENT file copy failure (error code 3)

BrentBR wrote:

Manual file copy also fails. Diagnostic is:
Permission denied; Error code: 3; Error message from server (en-US): Permission denied
However, when a copy fails, I can still delete the file on the server and replace it!
Delete and overwrite permissions are separate on most servers.
For example on *nix servers, to overwrite a file, you need write permissions to the file. But to delete a file, you need write permissions to a parent folder, and you do not need write permissions to the file.

BrentBR
Joined:
Posts:
3
Location:
London, Canada

Re: INTERMITTENT file copy failure (error code 3)

Martin, thank you.

All files are rw-r--r--. Directory is rwxr-xr--
Directory owner shows 36466 (whatever that means). File ownership shows 14 (also ???).

SOMETIMES file copy/replace works. Sometimes it fails. If it fails and I retry (restart WinSCP) it works often (often enough that I can live with it). But obviously I'd rather figure this out!

My isp wants me to switch over to "SSH" (whatever that is) using port 22. Currently I use port 21. But I'm not convinced that will fix anything, especially if the problem is intermittent and apparently related to permissions.

Any further ideas? Is there anything I can do that might figure out why this happens, but only sometimes? Thank you again.

martin
Site Admin
martin avatar

Re: INTERMITTENT file copy failure (error code 3)

Whatever the problem is, it's unlike that it's client-side problem.

Switching to SSH (actually to SFTP) is good idea in any case. So if your ISP suggests that, try it.

BrentBR
Joined:
Posts:
3
Location:
London, Canada

Re: INTERMITTENT file copy failure (error code 3)

I still have no resolution. However I've observed the following that seems to be consistent.
When I login to the server with WinSCP the login sometimes is very *fast* (almost instantaneous). Other times the login is fairly *slow*. Almost sluggish. "Slow" is often accompanied with initial connection failure, timeout, then connection success.

When login is fast/instant file copying fails! If the login is sluggish, it almost always works! This seems really bizarre to me but it is very consistent!

Something else has occurred to me (though this my be a red herring). Things worked fine on my old laptop but started failing with my new laptop which my son set up with an SSD. I can't see how this could possibly cause a problem, but might "instant" logins be associated with my SSD somehow? Like some sort of caching happening? (I don't believe in this association but I throw it out for you to trample.)

I'm still getting by, but occasionally get the urge to beat this dead horse some more. Thank you for putting up with this intermittent and apparently bizarre problem.

Advertisement

manisha sona
Guest

Best way is to get your folder copied from local machine to route

Of all the ways you can do this:
on your remote (Winscp), go to home directory. you can see a house icon beside refresh icon.
copy the folder from your local host (on left) to remote host (on right side). In this way the content will be copied from your local to remote (Home).
now, open the putty and ssh to remote machine.
use this command
cp -r /home/ec2-user/yourfoldernamewhichyoucopiedfromlocaltohome /desiredlocationonroot/

Example: I have folder called Manisha.txt and I want to copy that to sona directory which is located in /opt/ (/root/opt/sona)
cp -r /home/ec2-user/Manisha.txt /opt/sona
Thanks it!
it works.

Guest

Re: Permission denied - Error code 3

guest wrote:

Can anyone point me in the right direction to solve my problem?

When I try to transfer a file I get the following error:
Permission denied
Error Code: 3
Error message from server: Permission denied
Request Code: 3
Solution:
1. Open winscp
2. Start New Session -> Advanced ->Shell
3. Where it says Default, Change that to sudo su-
See attached below

Gayatri
Guest

Permission denied

sudo chmod -R 777 <Directoryname>
It will reduce permission denied problem.

Advertisement

This topic is locked: you cannot edit posts or make replies