I've a NAS DNS-320L from dlink running the original firmware + fun_plug which enable NAS to receive ssh connections. I can use the user ricardo to log into the server by ssh.[ricardo@crudo:~]$ ssh ricardo@192.168.1.140ricardo@192.168.1.140's password: Last login: Sat Oct 17 16:23:30 2015 from 192.168.1.112BusyBox v1.20.2 (2013-11-27 15:54:37 CST) built-in shell (ash)Enter 'help' for a list of built-in commands.~ $ uname -aLinux HipoteNAS 2.6.31.8 #1 Wed Aug 22 16:55:05 CST 2012 armv5tel GNU/LinuxBut, when I try to copy a file from server to my local machine I got a Permission denied message. Like that:[ricardo@crudo:~]$ scp -v ricardo@hipotenusab9:/mnt/HD/HD_a2/ricardo/test .Executing: program /usr/bin/ssh host hipotenusab9, user ricardo, command scp -v -f /mnt/HD/HD_a2/ricardo/testOpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to hipotenusab9 [192.168.1.140] port 22.debug1: Connection established.debug1: identity file /home/ricardo/.ssh/id_rsa type 1debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_rsa-cert type -1debug1: identity file /home/ricardo/.ssh/id_dsa type 2debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /home/ricardo/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.1debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000debug1: Authenticating to hipotenusab9:22 as 'ricardo'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: server->client aes128-ctr umac-64@openssh.com nonedebug1: kex: client->server aes128-ctr umac-64@openssh.com nonedebug1: sending SSH2_MSG_KEX_ECDH_INITdebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:2di8KzkN9fsQT1KBqP5f3GrMp5CA+Gctuvl87yFJEagdebug1: Host 'hipotenusab9' is known and matches the ECDSA host key.debug1: Found key in /home/ricardo/.ssh/known_hosts:32debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: publickeydebug1: Offering RSA public key: /home/ricardo/.ssh/id_rsadebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Skipping ssh-dss key /home/ricardo/.ssh/id_dsa for not in PubkeyAcceptedKeyTypesdebug1: Trying private key: /home/ricardo/.ssh/id_ecdsadebug1: Trying private key: /home/ricardo/.ssh/id_ed25519debug1: Next authentication method: keyboard-interactivedebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: passwordricardo@hipotenusab9's password: debug1: Authentication succeeded (password).Authenticated to hipotenusab9 ([192.168.1.140]:22).debug1: channel 0: new [client-session]debug1: Requesting no-more-sessions@openssh.comdebug1: Entering interactive session.debug1: Sending command: scp -v -f /mnt/HD/HD_a2/ricardo/testdebug1: client_input_channel_req: channel 0 rtype exit-status reply 0debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0sh: scp: Permission denieddebug1: channel 0: free: client-session, nchannels 1debug1: fd 0 clearing O_NONBLOCKdebug1: fd 1 clearing O_NONBLOCKTransferred: sent 2808, received 1808 bytes, in 0.0 secondsBytes per second: sent 187813.6, received 120928.4debug1: Exit status 127I do have permission to access this directory, as you can see below.[ricardo@crudo:~]$ ssh ricardo@192.168.1.140ricardo@192.168.1.140's password: Last login: Sat Oct 17 16:44:08 2015 from 192.168.1.112BusyBox v1.20.2 (2013-11-27 15:54:37 CST) built-in shell (ash)Enter 'help' for a list of built-in commands.~ $ ls -la /mnt/HD/HD_a2/drwxrwxrwx   15 root     root          4096 Oct 11 21:02 .drwxrwx---    3 root     root          4096 Jun  8  2014 .!@$mmcdrwxr-xr-x    3 root     root          1024 Oct 11 21:04 ..drwx------    9 root     root          4096 Oct 26  2014 .systemfiledrwxrwx---    4 root     root          4096 Jun 12  2014 Nas_Progdrwxrwxrwx    5 root     root          4096 Jun 22  2014 P2Pdrwxr-xr-x   15 root     root          4096 Jun 10  2014 ffp-rw-------    1 root     root         30049 Oct 11 21:05 ffp.log-rwxrwx---    1 root     root          1942 Jun  9  2014 fun_plugdrwx------    2 root     root         16384 Jun  8  2014 lost+founddrwxrwxrwx  219 nobody   allaccou     12288 Oct 25  2014 musicdrwxrwxrwx    3 nobody   allaccou      4096 Aug 23  2014 photodrwxrwxrwx   19 ricardo  media         4096 Oct 11 21:35 ricardodrwxrwxrwx   52 nobody   allaccou      4096 Aug 17 06:56 video~ $ ls -la /mnt/HD/HD_a2/ricardo/drwxrwxrwx   19 ricardo  media         4096 Oct 11 21:35 .drwxrwxrwx   15 root     root          4096 Oct 11 21:02 ..drwxrwxrwx   16 ricardo  media         4096 Jun 20  2014 Engenhariadrwxrwxrwx   75 ricardo  media         4096 Jul  5  2014 Fotosdrwxrwxrwx    7 ricardo  media         4096 Oct  7 18:50 Outrosdrwxrwxrwx    9 ricardo  media         4096 Jun 19  2014 Projetosdrwxrwxrwx   14 ricardo  media         4096 Jun 19  2014 SENAI-rwxrwxrwx    1 ricardo  media            0 Oct 11 21:35 testI can copy the file by using root user. Any ideia what could be happening?Edited.Bellow are the file permissions on server side:[ricardo@crudo:~]$ ssh ricardo@hipotenusab9ricardo@hipotenusab9's password: BusyBox v1.20.2 (2013-11-27 15:54:37 CST) built-in shell (ash)Enter 'help' for a list of built-in commands.~ $ scp-sh: scp: Permission denied~ $ echo $PATH/usr/bin:/bin:/usr/sbin:/sbin:/ffp/bin~ $ ls -la /mnt/HD/HD_a2/ffp/bin/scp-rwxr-xr-x    1 root     root         56200 Dec 29  2011 /mnt/HD/HD_a2/ffp/bin/scp~ $ ls -la /ffplrwxrwxrwx    1 root     root            17 Oct 18 22:23 /ffp -> /mnt/HD/HD_a2/ffpAs root:[ricardo@crudo:~]$ ssh root@hipotenusab9root@HipoteNAS:~# find / -name scp/mnt/HD/HD_a2/ffp/bin/scproot@HipoteNAS:~# 
I can't copy remote file using scp but I can log in using ssh
ssh;scp
scp: Permission deniedscp works by invoking the scp executable on the remote side. Apparently there's some problem with the remote installation: scp is present but can only be executed by root. Check the permissions on the scp executable (usually /usr/bin/scp or /usr/local/bin/scp) (also, on all the directories leading to it and on its loader, but those are probably ok given that other programs are working).