Dietpi: ProFtp login

Created on 18 Feb 2018  ·  10Comments  ·  Source: MichaIng/DietPi

Hello, ProFtp Fileserver is not working with ftp://root:[email protected] it does not accept the password, alternative is working with ftp://[email protected] and password dietpi

Can you fix this ?

Thanks

Question Unable to replicate

Most helpful comment

I did all this from a linux machine from the file manager,from the browser it opens fine with the ftp://root:[email protected] but i cannot add files like this only view the contends of the folder

That's correct.

So when i do this from a linux file manager in ubuntu mate (ftp://192.168.0.100) when i try to copy files in a folder i get an access denied error, i dont get any prompt for password.

That's correct.

Alternative i tried ftp://[email protected] works fine with files copy. it prompts for password(dietpi)

That's correct.

For me, ftp root login for /mnt/dietpi_userdata make no sense. _(with current proftp config)_

root@RPi-Zero:~# ls -lah /mnt/
total 28K
drwxr-xr-x  7 root   root   4.0K Feb 18 17:09 .
drwxr-xr-x 21 root   root   4.0K Jan 10 13:15 ..
drwxrwxr-x  6 dietpi dietpi 4.0K Feb 19 09:37 dietpi_userdata
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 ftp_client
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 nfs_client
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 samba
root@RPi-Zero:~# ls -lah /mnt/dietpi_userdata/
total 24K
drwxrwxr-x 6 dietpi dietpi 4.0K Feb 19 09:37 .
drwxr-xr-x 7 root   root   4.0K Feb 18 17:09 ..
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Music
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Pictures
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Video
drwxrwxr-x 2 dietpi dietpi 4.0K Feb 19 09:42 downloads

The proftp DefaultRoot /mnt/dietpi_userdata and all sub dirs are owned by user dietpi.
If it will be possible to put some here by user "root" , user "dietpi" can't do something with this file. (_with current config_)

Have a look into /etc/proftpd/proftpd.conf

root@RPi-Zero:~# cat /etc/proftpd/proftpd.conf
...
DefaultRoot /mnt/dietpi_userdata
...
RootLogin                       on
User                            root
Group                           root

Umask                           022  022
...

So if our umask value is 022, then any new files will, by default, have the permissions 644 (666 - 022). Likewise, any new directories will, by default, be created with the permissions 755 (777 - 022).

https://www.computerhope.com/unix/uumask.htm

I would suggest to set RootLogin off

If you think, you must have a ftp root login to /mnt/dietpi_userdata , you have to change Umask permissions digits. (but NOT recommended!)

_BTW: - a Browser or a FileExplorer can do, but are not recommended FTP Clients. For testing use eg. Filezilla or a FTP Program what ever you like._

All 10 comments

i forgot im using a raspberry pi with latest DietPi Stretch.

@symbios24

Hi,

Please confirm ftp://root:[email protected] was tested (you mentioned a different IP of .10).
ftp://root:[email protected] won't work with all programs (eg: chrome doesnt accept it and still prompts for user/pw).

In which case, simply try:
ftp://192.168.0.100

I'am unable to replicate any issues here (using the IP address of .105 to match my system):
ftp://root:[email protected]

image

sorry i meaN ftp://[email protected] it was a typo, i tried only with chrome, i did not know it does not accept it.so in firefox the ftp://root:[email protected] will work correct?

thanks

@symbios24

so in firefox the ftp://root:[email protected] will work correct?

Unsure. If in doubt, simply use the address without user/pw (eg: ftp://192.168.0.100), then enter them manually in when prompted.

I did all this from a linux machine from the file manager,from the browser it opens fine with the ftp://root:[email protected] but i cannot add files like this only view the contends of the folder,you need to do this from a file-manager/windows explorer

So when i do this from a linux file manager in ubuntu mate (ftp://192.168.0.100) when i try to copy files in a folder i get an access denied error, i dont get any prompt for password.

Alternative i tried ftp://[email protected] works fine with files copy. it prompts for password(dietpi)

ftp://root:[email protected] is not working it asks for password i put dietpi it does not accept it and still prompts for the pass.

I did all this from a linux machine from the file manager,from the browser it opens fine with the ftp://root:[email protected] but i cannot add files like this only view the contends of the folder

That's correct.

So when i do this from a linux file manager in ubuntu mate (ftp://192.168.0.100) when i try to copy files in a folder i get an access denied error, i dont get any prompt for password.

That's correct.

Alternative i tried ftp://[email protected] works fine with files copy. it prompts for password(dietpi)

That's correct.

For me, ftp root login for /mnt/dietpi_userdata make no sense. _(with current proftp config)_

root@RPi-Zero:~# ls -lah /mnt/
total 28K
drwxr-xr-x  7 root   root   4.0K Feb 18 17:09 .
drwxr-xr-x 21 root   root   4.0K Jan 10 13:15 ..
drwxrwxr-x  6 dietpi dietpi 4.0K Feb 19 09:37 dietpi_userdata
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 ftp_client
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 nfs_client
drwxr-xr-x  2 root   root   4.0K Jan 10 14:12 samba
root@RPi-Zero:~# ls -lah /mnt/dietpi_userdata/
total 24K
drwxrwxr-x 6 dietpi dietpi 4.0K Feb 19 09:37 .
drwxr-xr-x 7 root   root   4.0K Feb 18 17:09 ..
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Music
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Pictures
drwxrwxr-x 2 dietpi dietpi 4.0K Jan 29 09:53 Video
drwxrwxr-x 2 dietpi dietpi 4.0K Feb 19 09:42 downloads

The proftp DefaultRoot /mnt/dietpi_userdata and all sub dirs are owned by user dietpi.
If it will be possible to put some here by user "root" , user "dietpi" can't do something with this file. (_with current config_)

Have a look into /etc/proftpd/proftpd.conf

root@RPi-Zero:~# cat /etc/proftpd/proftpd.conf
...
DefaultRoot /mnt/dietpi_userdata
...
RootLogin                       on
User                            root
Group                           root

Umask                           022  022
...

So if our umask value is 022, then any new files will, by default, have the permissions 644 (666 - 022). Likewise, any new directories will, by default, be created with the permissions 755 (777 - 022).

https://www.computerhope.com/unix/uumask.htm

I would suggest to set RootLogin off

If you think, you must have a ftp root login to /mnt/dietpi_userdata , you have to change Umask permissions digits. (but NOT recommended!)

_BTW: - a Browser or a FileExplorer can do, but are not recommended FTP Clients. For testing use eg. Filezilla or a FTP Program what ever you like._

@symbios24

Question is answered? Can we close this issue?

@Fourdee

Should we better set RootLogin off in /etc/proftpd/proftpd.conf as default?
https://github.com/Fourdee/DietPi/blob/master/dietpi/conf/proftpd.conf#L37

Yes thank you

@k-plan

Should we better set RootLogin off in /etc/proftpd/proftpd.conf as default?

Yep, we can change to dietpi user as /mnt/dietpi_userdata has those permissions.

🈯️ Tested via Windows explorer

Completed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MichaIng picture MichaIng  ·  3Comments

k-plan picture k-plan  ·  3Comments

bhaveshgohel picture bhaveshgohel  ·  3Comments

Fourdee picture Fourdee  ·  3Comments

Kapot picture Kapot  ·  3Comments