Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ProFTPD Plugin for unRAID v6.8.x

Featured Replies

anyone?

  • Replies 845
  • Views 241.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • @MJA Inc. The second install option from the first post should still work, I think.   @all If anyone want's to pick up my work, you're welcome! It is open source, feel free to use

  • soschronotek
    soschronotek

    genius, this worked perfectly on my new install. this is definitely a bug or something

  • @geonerdist Yes, that is the reason.

Posted Images

On 1/14/2020 at 10:32 AM, SlrG said:

@fatmaddin2000

Sorry for the late reply. Notifications did not work.

 

It seems the naming of the file /etc/ssl/openssl.cfg has changed back to the default /etc/ssl/openssl.cnf.

So the command is now:


openssl req -new -x509 -config /etc/ssl/openssl.cnf -days 3650 -nodes -out /boot/config/plugins/proftpd/ssl/ftp.cert.pem -keyout /boot/config/plugins/proftpd/ssl/ftp.key.pem

 

@SlrG

Thanks! I have updated the original post back to the .cnf file.

Edited by Necrotic

  • 1 month later...

For anyone looking to get this working with unRAID 6.8.x it is actually fairly simple.

 

First I would like to talk about why this plugin no longer works with 6.8.x as it is currently implemented.

Due to the tightening of security in 6.8.x we are no longer able to execute from the flash drive.

mountscript.sh no longer is executing and as such the FTP will not have the folder structure require to allow logins and this can be seen in the system log. So we are left with a few options to fix this mountscript not executing.
We can manually create the file structure required as defined in the mountscript. However this does not survive a reboot, so other than testing, its not a viable option.  The go file, you might be able to use it, but that is not the intention of the go file. You may cause further issues so best to leave that alone.  crontab could work, with limitations. You need to implement crontab in a hacky way in order for your scripts to survive a reboot.

 

The easy fix for 6.8.x is to use "CA User Scripts"

 

Install this plugin

add new script

edit script

copy the mountscript.sh into your new script. (#comments can be copied without issues)

set to run at "At first array start only"

apply

 

either run the script now and your FTP will now work or reboot and test it.

 

That's it, ProFTPD now works in 6.8.x

 

 

 

 

7 hours ago, JaY_III said:

...why this plugin no longer works with 6.8.x as it is currently implemented.

Your setup must be different to mine, since I've not had any problems.

2 hours ago, Cessquill said:

Your setup must be different to mine, since I've not had any problems.

This is the error I get without the script I posted.

 


Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - notice: unable to use DefaultRoot '~/' [resolved to '/tmp/FTP/']: No such file or directory
Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - chroot to '~/' failed for user 'JaY_III': No such file or directory
Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - error: unable to set DefaultRoot directory

 

 

32 minutes ago, JaY_III said:

This is the error I get without the script I posted.

 

 


Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - notice: unable to use DefaultRoot '~/' [resolved to '/tmp/FTP/']: No such file or directory
Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - chroot to '~/' failed for user 'JaY_III': No such file or directory
Mar 10 08:05:35 unRAID proftpd[9325]: 127.0.0.1 (192.168.1.1[192.168.1.1]) - error: unable to set DefaultRoot directory

Fair enough - I suspect a second user I have might suffer the same issue.  Been a while since I set it up, and don't use the other user ATM.

 

 

 

  • Author

@JaY_III

Thank you for posting an interim solution and notifying me of the problem and the underlying cause as well. 👍

 

As I use no mount/unmount scripts myself, I would not have noticed the problem otherwise. 😳

 

I released a new version of the plugin, that should fix the problem without having to depend on the user scripts plugin. Please test the new version and report any problems.

@SlrG

All is well with the latest plugin update.

Thank you again.

 

 

 

  • 5 weeks later...

Any possibilities to get a working realtime GUI for the plugin?

I want to monitor the current transfers etc.. Also i want the ability to manage users and close connections / file transfers.

What possibilties are available?

  • Author

AFAIK there is no good web based control center for ProFTPd that does what you want. If you know one, please let me know.
That would be the only way that could make it work in conjunction with this plugin.

 

Using one of the graphical ones, would  require a large number of packages, that are not supplied by a stock unRAID.

As this is a plugin and directly integrated, each new package increases the risk of breaking something in the unRAID base functionality or adding unwanted vulnerabilities.  So this is no solution I would be willing to implement.

 

In your case I would recommend setting up a VM where you can install whatever you want, without the risk of damaging the base system. Or maybe there are docker containers, with your needed functionality. The CrushFTP one available under Apps looks promising - I did not test it though.

  • 4 weeks later...

Hi i wanna set up proftp with two virtual users. how exaclty can i add it? Normal tutorials dosnt work for me. I use the mod_auth_file methode. In the next step i want to share more than only one folder to that ftp-user. How can i do that?

  • Author

@Gee1

Well, its maybe not straightforward, but possible. Following the info given here one needs to use the tool ftpasswd to generate the AuthUserFile.

 

This tool is located in /usr/local/SlrG-Common/usr/local/bin, so you need to cd into that path and run it. As it is a perl script, it will fail if you have no perl installed (default unRAID). To get it you will need to install the nerdpack plugin using APPS (Community Applications). After it is installed, go to its settings, search and enable the perl package.

 

Afterwards ftpasswd will run.  The usage is described here. This command will create a ftpd.passwd file.

ftpasswd --passwd --name vu1 --home /mnt/cache/FTP/vu1 --shell /bin/false --uid 1005

vu1 is the placeholder username I choose and I used it to define the home directory of that user, too. Setting the shell to /bin/false should prevent this user from logging in using the shell and for the uid make sure this is not already existing and used on your system. I omitted defining a group id gid, so it will be set to be the same as the uid. Create the second user using the same command, too, but change those placeholders and uid.

 

Now you move the ftpd.passwd file to the folder /boot/config/plugins/ProFTPd on the flash, so it will survive reboots of the system and add the following line to the /etc/proftpd.conf file.

AuthUserFile /boot/config/plugins/ProFTPd/ftpd.passwd

Afterwards you will have to restart the ProFTPd service in the plugins settings, to enable the change. Now your new user(s) should be able to ftp into their home directory. To mount content (one or more folders from other locations) to the homedirs use the the mountscript.sh and unmountscript.sh in /boot/config/plugins/ProFTPd/.  Example commands how to use them are given in the comment headers of those files.

thank you very much it all works as it should

 

question to mountscript: should i user user0 or user? Whats the difference

Edited by Gee1

5 hours ago, Gee1 said:

question to mountscript: should i user user0 or user? Whats the difference

user includes files/folders for a User Share that is on the array drives or the cache whereas user0 only includes files/folders for a User Share that are on the main array drives (omitting any that are on the cache).

 

Limetech have announced that user0 is deprecated and may be removed in a future Unraid release.

ok. Is there any statistik for proftpd. EG which user logs in and how many traffic ?

  • Author

@Gee1

If you enable the TransferLog in the /etc/proftpd.conf you should get a log file, which user logs in when and what and how much is transferred. In theory, I never did this myself, you can load that into Webalizer and get an aggregated report. Also there are the commands ftpcount, ftpwho, ftptop in /usr/local/SlrG-Common/usr/local/bin, though they give only realtime information and the ftptop command is broken, as I seem to have not included the ncurses development libraries when compiling ProFTPd for unRAID.

I'm getting the feeling ProFTPd is not the right tool to suit your needs. While it is quite powerful it is also not very user friendly and hard to manage. I developed the plugin,  when no other solution was available and integrated it into unRAIDs user management. I had and have not much need for "fancy" stuff like different access rights, many users, encryption and statistics. I understand it perfectly however, if one wants more. Maybe the CrushFTP9 docker from Community Applications would be better?

crush fpt is shit.. buggy and very expensive for private use. Atm im very happy with proftod

  • Author

@Gee1

I'm sorry, I didn't know it was not free. 😱 I found it in the list of other FTP clients and saw a screenshot, of its statistics page and gui, which looked rather nice, so I thought it could be better. I'll try to release a new version which will hopefully fix ftptop. I'm curious how its output will look like, it will take me some days however.

no problem i used crushftp free version for a year and it frequently forget the user data and many more bugs with passive ports etc..  but proftp runs real nice.. a webIF for that would be reeealy nice with stats etc

i mountet the subfolders from user folder to the home dir on /mnt/cache/   ... is this a problem for the mover? Or does the mover know that these are just links ?

 

I have a very big problem with mount points and the mover.

 

i binded some folders from /mnt/users/Movies to  /mnt/cache/FTP/Movies

and now the mover moves all files from /mnt/cache/FTP/Movies to /mnt/user/movies which is impossible, it corruptet my files

 

how is it possible to tell the mover it should ignore mountpoints / symlinks ??

 

ok now i set the FTP share to cache only hopefulyl that works

Edited by Gee1

  • Author

@Gee1

Setting to cache only should be the solution. I have it setup this way myself. I just got the time to go online and post, sadly it already created trouble. But I'm glad you found the solution yourself. I hope you can successfully restore the corrupted data.

how can i forbid users to write to the root dir (home)?

Edited by Gee1

  • Author

@Gee1

You can do this by defining directory clauses and limits within. Its also possible to allow or deny certain users. Read here.

bi know but the problem is when i forbit write to the root dir it also dissalows write on the folders within, i only want to forbit to create new folders and filse in root dir

Can it be true that I cannot create read-only users?

I created users in unRaid and set the description as needed. But even though they are set as only having read-access to a given share, they still have write access?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.