the problem could be read/write access to the files located on your SD card. Because you like to move, means you need to delete the file. And this is possible with write permission only. Can you share the permission of the file you like to move
In the folder there’s a mix of folders, some that Radarr moved and some I did.
All the folders have one of these two permissions
drwxrwxr-x 2 dietpi dietpi
drwxrwx--- 2 dietpi dietpi
The files inside the folders are all
-rw-rw---- 1 dietpi dietpi
I’ve tried moving one of each folder type but get the same outcome.
just for my understanding. It’s as well not working using FileZilla from a computer?
Yeah in my app I get a permission denied in filezilla on my PC nothing happens but in the log it will say something like:
Command: CWD /dietpi_userdata/Plex/Movies
Response: 250 CWD command successful
Command: RNFR Human Traffic (1999)
Response: 350 File or directory exists, ready for destination name
Command: RNTO /External/Movies/Human Traffic (1999)
Response: 550 Rename /External/Movies/Human Traffic (1999): Is a directory
ok for me there is no issue on moving files from SD card to an external USB stick using FTP
tool used: WinSCP
file name: demo.file
source directory: /mnt/dietpi_userdata/downloads
target directory: /mnt/usb/
FTP root directory: /mnt
I did a full debug logging in SCP, below the short part for moving the file
. 2021-03-16 22:07:40.426 Moving file "demo.file" to "/usb/demo.file".
> 2021-03-16 22:07:40.426 RNFR /dietpi_userdata/downloads/demo.file
< 2021-03-16 22:07:40.428 350 File or directory exists, ready for destination name
> 2021-03-16 22:07:40.428 RNTO /usb/demo.file
< 2021-03-16 22:07:40.431 250 Rename successful
. 2021-03-16 22:07:40.431 Got reply 1 to the command 128
. 2021-03-16 22:07:40.434 Retrieving directory listing...
> 2021-03-16 22:07:40.434 TYPE A
< 2021-03-16 22:07:40.435 200 Type set to A
> 2021-03-16 22:07:40.435 PASV
< 2021-03-16 22:07:40.437 227 Entering Passive Mode (192,168,0,12,142,37).
Before, I ensured all files and folders belong to user dietpi.
Question, are you able to create a demo file on SD card and try to delete it using FTP?
Thanks I just tried that, I can create a folder in /dietpi_userdata/Plex/Movies/ through filezilla and then upload a file from my PC to that folder and delete the file and folder through Filezilla.
I can do the same from my PC to my external drive in /mnt/External.
I just can’t use Filezilla or my app (FE File Explorer) to move stuff from /dietpi_userdata/Plex/Movies/ to /mnt/External/Movies
pls try following via FTP
create following folder
/dietpi_userdata/Plex/Movies/demo/
/mnt/External/Movies/demo/
create following file
/dietpi_userdata/Plex/Movies/demo/demo.file
try to move demo.file into /mnt/External/Movies/demo/
What do you have in the filezilla log? Are there options to increase logging inside filezilla ?
That worked, I can move the demo.file between the demo directories using FTP. I can’t see any options for anymore logging in filezilla
The only thing that’s logged when I move the demo file is
Status: Renaming '/dietpi_userdata/Plex/Movies/demo/demo.file' to '/External/Movies/demo/demo.file'
can you move the demo file between /mnt/dietpi_userdata/Plex/Movies and /mnt/External/Movies/
Yes, anything I create in FTP I seem to be able to move between the drivers fine it’s just folders pre-existing folders and files I can’t seem to move
pls share
ls -la /mnt/dietpi_userdata/Plex/Movies
ls -la /mnt/External/Movies/
root@DietPi:/mnt/External# ls -la /mnt/dietpi_userdata/Plex/Movies
total 128
drwxrwxrwx 31 dietpi dietpi 4096 Mar 16 21:57 .
drwxrwxrwx 5 root root 4096 Mar 16 16:43 ..
-rw-rw-r-- 1 dietpi dietpi 118 Mar 16 21:21 .zshrc
drwxrwx--- 2 dietpi dietpi 4096 Mar 15 14:31 'Baby Done (2021)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 30 11:30 'Bedazzled (1967)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 26 00:37 'Bedazzled (2000)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 11 22:03 'Buried (2010)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 12 20:35 'Cherry (2021)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 7 00:40 'Contagion (2011)'
drwxrwxr-x 2 dietpi dietpi 4096 Nov 11 21:26 'Death to Smoochy (2002)'
drwxrwxr-x 2 dietpi dietpi 4096 Mar 12 22:04 'Drive (2011)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 11 21:23 'Enron The Smartest Guys In The Room (2005)'
drwxrwxr-x 2 dietpi dietpi 4096 Dec 24 10:38 'Freeze Frame (2004)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 6 22:43 'Hall Pass (2011)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 7 02:50 'Human Traffic (1999)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 11 22:04 'I Am Ali (2014)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 11 22:04 'Kurt Cobain Montage of Heck (2015)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 26 17:35 'Resident Evil (2002)'
drwxrwxr-x 2 dietpi dietpi 4096 Feb 5 02:00 'Resident Evil Damnation (2012)'
drwxrwxr-x 2 dietpi dietpi 4096 Feb 15 18:02 'Royal Family (1969)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 12 20:35 'SAS Red Notice (2021)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 7 00:31 'Stars fell on Alabama (2021)'
drwxrwxr-x 2 dietpi dietpi 4096 Mar 11 23:11 'The Inbetweeners 2 (2014)'
drwxrwxr-x 2 dietpi dietpi 4096 Mar 11 23:10 'The Inbetweeners Movie (2011)'
drwxrwxr-x 2 dietpi dietpi 4096 Feb 20 16:56 'The Owners (2020)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 12 20:35 'The Vault (2021)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 27 14:56 'Ultraviolet (2006)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 27 14:56 'Underworld (2003)'
drwxrwxr-x 2 dietpi dietpi 4096 Feb 8 00:12 'Vice (2018)'
drwxrwx--- 2 dietpi dietpi 4096 Mar 12 20:36 'Way Down (2021)'
drwxrwxr-x 2 dietpi dietpi 4096 Jan 26 17:20 'Young Adult (2011)'
drwxrwxr-x 2 dietpi dietpi 4096 Mar 16 21:36 demo
root@DietPi:/mnt/External# ls -la /mnt/External/Movies/
total 5
drwxrwxrwx 1 dietpi dietpi 568 Mar 16 21:59 .
drwxrwxrwx 1 dietpi dietpi 4096 Mar 16 20:35 ..
drwxrwxrwx 1 dietpi dietpi 240 Mar 12 07:50 'A Royal Night Out (2015)'
drwxrwxrwx 1 dietpi dietpi 176 Feb 14 01:53 'Stay Tuned (1992)'
drwxrwxrwx 1 dietpi dietpi 232 Feb 16 15:04 'The Fighter (2010)'
drwxrwxrwx 1 dietpi dietpi 240 Dec 6 15:38 'The Sugarland Express (1974)'
drwxrwxr-x 1 dietpi dietpi 0 Mar 16 21:36 demo
ok I guess I got it. At least I’m able to reproduce same error message 550 Rename
. 2021-03-16 23:15:30.546 Moving file "demo" to "/usb/demo/demo".
> 2021-03-16 23:15:30.546 RNFR /dietpi_userdata/downloads/demo
< 2021-03-16 23:15:30.546 350 File or directory exists, ready for destination name
> 2021-03-16 23:15:30.546 RNTO /usb/demo/demo
< 2021-03-16 23:15:30.561 550 Rename /usb/demo/demo: Is a directory
. 2021-03-16 23:15:30.561 Asking user:
. 2021-03-16 23:15:30.561 Error moving file 'demo' to '/usb/demo/demo'. ("Rename /usb/demo/demo: Is a directory")
Looks like it is not possible to move directories using FTP. Probably you would need to use SAMAB or SCP
For me SCP is working fine. This is the output
. 2021-03-16 23:19:38.101 Listing current directory.
> 2021-03-16 23:19:38.101 ls -la --full-time ; echo "WinSCP: this is end-of-file:$?"
< 2021-03-16 23:19:38.101 total 16
< 2021-03-16 23:19:38.101 drwxrwxr-x 4 dietpi dietpi 4096 2021-03-16 23:19:39.389050514 +0100 .
< 2021-03-16 23:19:38.101 drwxrwxr-x 8 dietpi dietpi 4096 2021-03-14 11:26:51.869668226 +0100 ..
< 2021-03-16 23:19:38.101 drwxrwxr-x 2 dietpi dietpi 4096 2021-03-16 23:09:50.679050739 +0100 The Inbetweeners Movie (2011)
< 2021-03-16 23:19:38.101 drwxrwxr-x 2 dietpi dietpi 4096 2021-03-16 23:15:17.569050614 +0100 demo.scp
< 2021-03-16 23:19:38.101 WinSCP: this is end-of-file:0
. 2021-03-16 23:19:38.101 ..;d;0;2021-03-14T10:26:51.000Z;3;"dietpi" [0];"dietpi" [0];rwxrwxr-x;0
. 2021-03-16 23:19:38.101 The Inbetweeners Movie (2011);d;0;2021-03-16T22:09:50.000Z;3;"dietpi" [0];"dietpi" [0];rwxrwxr-x;0
. 2021-03-16 23:19:38.101 demo.scp;d;0;2021-03-16T22:15:17.000Z;3;"dietpi" [0];"dietpi" [0];rwxrwxr-x;0
. 2021-03-16 23:19:46.932 Moving file "demo.scp" to "/mnt/usb/demo.scp".
> 2021-03-16 23:19:46.932 mv -f "demo.scp" "/mnt/usb/demo.scp" ; echo "WinSCP: this is end-of-file:$?"
< 2021-03-16 23:19:46.932 WinSCP: this is end-of-file:0
. 2021-03-16 23:19:46.948 Listing current directory.
> 2021-03-16 23:19:46.948 ls -la --full-time ; echo "WinSCP: this is end-of-file:$?"
< 2021-03-16 23:19:46.948 total 12
< 2021-03-16 23:19:46.948 drwxrwxr-x 3 dietpi dietpi 4096 2021-03-16 23:19:48.239050511 +0100 .
< 2021-03-16 23:19:46.948 drwxrwxr-x 8 dietpi dietpi 4096 2021-03-14 11:26:51.869668226 +0100 ..
< 2021-03-16 23:19:46.948 drwxrwxr-x 2 dietpi dietpi 4096 2021-03-16 23:09:50.679050739 +0100 The Inbetweeners Movie (2011)
< 2021-03-16 23:19:46.948 WinSCP: this is end-of-file:0
Thanks for looking into for me, I’ll take a look at using SCP in the morning and see how it goes.
you would need to install OpenSSH Client (software ID 0) if you like to use SCP
SCP works with the default dropbear or openssh-server. There is no need to install the client.
well not fully correct. trendy. Yes you can connect using SCP but you are not able to transfer files because you are missing the SCP executable. In theory it’s possible to copy this single file in place, but more easier to install OpenSSH Client
SCP is part of the openssh-client package and SFTP is part of the openssh-sftp-server package, so indeed openssh-server itself is not required.
There is an alternative SFTP server: https://packages.debian.org/buster/gesftpserver
I use this on my systems with Dropbear, it seems lighter than OpenSSH’s SFTP. But it does not ship the executable as /usr/lib/sftp-server. In WinSCP it can be manually changed, but for other SFTP clients a symlink does the job.
Nope, it is fully correct. I have only dropbear running on one dietpi and only openssh-server on anoter, no openssh-client on either of them.
I just connected via scp and copied a file on both.
If you are not going to initiate the connection from the dietpi, then the openssh-client is not needed.
Interesting. I also thought the scp binary is required on both devices, similarly how the sftp-server binary is required on the target/server device. Probably something changed in Dropbear, serving it internally? Good to know when we want to add SFTP and SCP as install options in combination with Dropbear.