I have an app on my phone which I use to FTP to my DietPi when I want to move things from my Downloads folder to my Plex folder. I’ve just added an external drive to my Pi, using the driver-manager I’ve got it to mount to /mnt/External but when I FTP through my phone or on my laptop I can’t navigate to /mnt
Is it possible to get access to this directory through ftp? I’m currently connecting using the dietpi username
Did you install the FTP server via dietpi-software? If so which one did you choose, ProFTPD or vsftpd?
By default we setup the servers to have the document root at /mnt/dietpi_userdata, but it can be changed.
E.g. check out the “Destination directory” tab here: https://dietpi.com/docs/software/file_servers/#proftpd
I use an app on my android phone called ESfile explorer that will allow me to see the network shares
I do believe it supports SCP as well
https://android.stackexchange.com/questions/27298/winscp-for-android-equivalent
Thanks I’m using proFTPD I’ve made that change but now when I try to copy something from local to the external I get a permission denied message, is there something else I need to do to give it permissions?
you are accessing the FTP share as user DietPi. You would need to check permissions on OS level
ls -la /mnt/
Thanks, that gives me:
drwxr-xr-x 8 root root 4096 Mar 15 21:18 .
drwxr-xr-x 21 root root 4096 Jan 28 17:33 …
drwxrwxrwx 1 root root 4096 Mar 16 13:08 External
drwxr-xr-x 3 root root 4096 Feb 27 09:05 dietpi-backup
drwxrwxr-x 11 dietpi dietpi 4096 Feb 2 11:27 dietpi_userdata
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 2020 ftp_client
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 2020 nfs_client
drwxrwxr-x 2 dietpi dietpi 4096 Sep 10 2020 samba
External is my attached drive, how can I add dietpi to it? or can I FTP as root? When I’ve tried that before it never connected.
the folder External has full r/w permission for everybody.
drwxrwxrwx 1 root root 4096 Mar 16 13:08 External
Let’s check inside
ls -la /mnt/External
Thank you, that give me:
root@DietPi:/mnt# ls -la /mnt/External
total 8
drwxrwxrwx 1 root root 0 Mar 15 22:20 ‘$RECYCLE.BIN’
drwxrwxrwx 1 root root 4096 Mar 16 13:08 .
drwxr-xr-x 8 root root 4096 Mar 15 21:18 …
drwxr-xr-x 1 root root 0 Mar 15 19:04 Movies
drwx------ 1 root root 0 Mar 15 19:04 ‘System Volume Information’
drwxr-xr-x 1 root root 0 Mar 15 19:04 TV
d--------- 1 root root 0 Mar 15 22:20 found.000
In filezilla if I try to create a new folder in say Movies I get
550 New directory: Permission denied
what file system format you are using on the external device?
I formatted on my PC so I can use it on my pi and Windows if needed so it’s NTFS
ProFTPD runs as dietpi:dietpi by default. So while it should be able to write to the root of the external drive, it cannot write to any of its sub directories. The following should do it:
chown -R dietpi:dietpi /mnt/External
You could use more fine grained permissions but since it seems to be a pure media drive, dietpi group and user are exactly there for this purpose and used by other media-related software services as well.
Thanks, I’ve just tried that. I can now create folders in the subfolders of External but when I try to move a folder from my SD to External I still get a permission denied message
What permissions does that particular file have? Probably the dietpi user has no read permissions?
ls -l /path/to/that/file
Thanks those folders are also root:
drwxrwxrwx 34 root root 4096 Mar 15 21:21 Movies
drwxrwxr-x 2 dietpi dietpi 4096 Mar 16 16:43 Preroll
drwxrwxrwx 12 root root 4096 Mar 15 20:54 TV
If I change them to dietpi will Plex still work? I’m assuming so because Preroll is dietpi and that contains videos that play before movies
I tried setting those folders to dietpi but still couldn’t copy from my SD to External
I’ve set them back now
I can move files from my PC to the External via filezilla but not from the Pi’s SD to the External
I’ve got an external hdd plugged into my Pi, using filezilla I can create folders and download content from my External to my PC but if I just want to copy something from my SD card to the External I’m unable to.
The folder I want to copy from on my SD is
/dietpi_userdata/Plex
root@DietPi:/mnt/dietpi_userdata# ls -la Plex/
total 20
drwxrwxrwx 5 root root 4096 Mar 16 16:43 .
drwxrwxr-x 11 dietpi dietpi 4096 Mar 16 19:01 ..
drwxrwxrwx 33 dietpi dietpi 4096 Mar 16 18:36 Movies
drwxrwxr-x 2 dietpi dietpi 4096 Mar 16 16:43 Preroll
drwxrwxrwx 12 dietpi dietpi 4096 Mar 15 20:54 TV
The folder I want to copy to on my external drive is
/mnt/External/
root@DietPi:/mnt/dietpi_userdata# ls -la /mnt/External/
total 8
drwxrwxrwx 1 dietpi dietpi 0 Mar 15 22:20 '$RECYCLE.BIN'
drwxrwxrwx 1 dietpi dietpi 4096 Mar 16 18:19 .
drwxr-xr-x 8 root root 4096 Mar 15 21:18 ..
drwxr-xr-x 1 dietpi dietpi 184 Mar 16 18:35 Movies
drwx------ 1 dietpi dietpi 0 Mar 15 19:04 'System Volume Information'
drwxr-xr-x 1 dietpi dietpi 0 Mar 16 16:46 TV
d--------- 1 dietpi dietpi 0 Mar 15 22:20 found.000
If I open a terminal and use mv I can copy the file but I’d prefer to have it working with FTP so I can use an app on my phone.
Also Plex can’t detect anything on the external so I must have something wrong with the permissions.
You need to change the root directory of the ftp server. In proftpd you need to change the line
DefaultRoot /mnt/dietpi_userdata
into something that includes all the subdirectories you want to access.
However copying via ftp is kind of waste of resources, as you move the file over the network twice.
Better use the midnight commander, found in dietpi-software, under software additional.
In proftpd.conf I already have
DefaultRoot /mnt/
I’ll have a look at midnight commander but it seems like a terminal tool I’d rather stick to FTP if possible so I can do it all through the app on my phone.
not sure why you open this topic while you have already open another one. Will move them together.