proftpd file access Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Zeirgul

proftpd file access

Post by Zeirgul »

I have dietpi installed on a raspberry pi with a usb hard drive mounted to /mnt/HDD. I am trying to access the files on the hard drive from my computer using proftpd. I set it up that / is shared.

When I log into the ftp, it opens to root directory. I can access all folders except /mnt. When I select /mnt, it loads indefinitely. There aren't any error messages.

I can view /mnt without any issues via SSH.

Any ideas on why this happening and how to fix it?
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: proftpd file access

Post by Fourdee »

Zeirgul wrote: I select /mnt, it loads indefinitely.

I can view /mnt without any issues via SSH.

Any ideas on why this happening and how to fix it?
Hi,

Not sure, possibly a systemD automount without the drive attached is causing this, lets check your fstab, please paste results:

Code: Select all

cat /etc/fstab
And current drives:

Code: Select all

blkid
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Zeirgul

Re: proftpd file access

Post by Zeirgul »

root@DietPi:~# cat /etc/fstab
#Internal Drives---------------------------------------------------
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot auto defaults,noatime,discard 0 2
/dev/mmcblk0p2 / auto defaults,noatime,discard 0 1
tmpfs /tmp tmpfs defaults,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=20m,noatime,nodev,nosuid,mode=1777 0 0
tmpfs /DietPi tmpfs defaults,size=10m,noatime,nodev,nosuid,mode=1777 0 0

#External Drives---------------------------------------------------
#NB: Please use dietpi-drive_manager to setup and control your external drives.

#Samba Client------------------------------------------------------
#/mnt/samba . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#FTP Client Mount--------------------------------------------------
#/mnt/ftp_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#NFS Client Mount--------------------------------------------------
#/mnt/nfs_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
UUID=2016-11-15-22-03-09-00 /mnt/2016-11-15-22-03-09-00 auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=6007-F982 /mnt/6007-F982 auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=1c2eb970-8839-3b51-9555-1d17a206366b /mnt/1c2eb970-8839-3b51-9555-1d17a206366b auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=A4D2134CD213225A /mnt/HDD auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=37d6e728-ed1a-43fe-b8da-ba4af4ee9a18 /mnt/37d6e728-ed1a-43fe-b8da-ba4af4ee9a18 auto defaults,noatime,nofail,x-systemd.automount 0 0
root@DietPi:~# blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="70F7-FA1D" TYPE="vfat" PARTUUID="53149740-01"
/dev/mmcblk0p2: UUID="3598ef8e-09be-47ef-9d01-f24cf61dff1d" TYPE="ext4" PARTUUID="53149740-02"
/dev/mmcblk0: PTUUID="53149740" PTTYPE="dos"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="6f640235-a581-4e46-97b2-f14f63dab38f"
/dev/sda2: LABEL="Seagate Expansion Drive" UUID="A4D2134CD213225A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="9f7d98dd-ff83-4bac-a84e-635911083ed9"
root@DietPi:~# blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="70F7-FA1D" TYPE="vfat" PARTUUID="53149740-01"
/dev/mmcblk0p2: UUID="3598ef8e-09be-47ef-9d01-f24cf61dff1d" TYPE="ext4" PARTUUID="53149740-02"
/dev/mmcblk0: PTUUID="53149740" PTTYPE="dos"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="6f640235-a581-4e46-97b2-f14f63dab38f"
/dev/sda2: LABEL="Seagate Expansion Drive" UUID="A4D2134CD213225A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="9f7d98dd-ff83-4bac-a84e-635911083ed9"
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: proftpd file access

Post by Fourdee »

Code: Select all

UUID=2016-11-15-22-03-09-00 /mnt/2016-11-15-22-03-09-00 auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=6007-F982 /mnt/6007-F982 auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=1c2eb970-8839-3b51-9555-1d17a206366b /mnt/1c2eb970-8839-3b51-9555-1d17a206366b auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=A4D2134CD213225A /mnt/HDD auto defaults,noatime,nofail,x-systemd.automount 0 0
UUID=37d6e728-ed1a-43fe-b8da-ba4af4ee9a18 /mnt/37d6e728-ed1a-43fe-b8da-ba4af4ee9a18 auto defaults,noatime,nofail,x-systemd.automount 0 0

/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="70F7-FA1D" TYPE="vfat" PARTUUID="53149740-01"
/dev/mmcblk0p2: UUID="3598ef8e-09be-47ef-9d01-f24cf61dff1d" TYPE="ext4" PARTUUID="53149740-02"
/dev/mmcblk0: PTUUID="53149740" PTTYPE="dos"
/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="6f640235-a581-4e46-97b2-f14f63dab38f"
/dev/sda2: LABEL="Seagate Expansion Drive" UUID="A4D2134CD213225A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="9f7d98dd-ff83-4bac-a84e-635911083ed9"
Yep, looks like you have not unmounted drives on your system, in dietpi-drive_manager, before physical removal. If you did, they would be commented out (disabled).

As the fstab entries still exists, the system still thinks the drives are available and may hang commands/dir browsing in /mnt (issue with x-systemd.automount).

You need to manually cleanup and remove unused entries in /etc/fstab.
The following unused entries/lines can be removed in /etc/fstab:

Code: Select all

UUID=37d6e728-ed1a-43fe-b8da-ba4af4ee9a18
UUID=1c2eb970-8839-3b51-9555-1d17a206366b
UUID=6007-F982
Reload systemd:

Code: Select all

systemctl daemon-reload
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Zeirgul

Re: proftpd file access

Post by Zeirgul »

That worked. Thank you so much!
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: proftpd file access

Post by Fourdee »

Zeirgul wrote:That worked. Thank you so much!
Excellent, great to hear :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply