ProFTPD Plugin for unRAID v6.8.x


SlrG

Recommended Posts

I would not recommend you to do that. There is a reason that newer beta versions exists. A lot of problems have been fixed on the way.

 

What do you want to do with the ftpserver? Maybe the vsftp that already comes with stock unraid will be enough to help you until a new version of the plugin or an proftpd docker is released?

Link to comment
  • 2 months later...

Still a plugin for now. I did some extensive docker testing and while it is possible to create a docker with proftpd, the unraid based usermanagement, like it was possible with the old plugin/and will be with the new one, would not work. Also it is quite hard to get ftp where after the initial connect on transfer a whole range of ports is used, to work with docker. I really would have liked to go the docker route, but in the end I decided against it.

Link to comment

That is a somewhat short error description.  :) I need more detail.

 

What are the names of the ftpusers you created?

What are the comments you saved with those users.

Did you restart ProFTPd after creating the users?

 

User 1 - defyance

User 1 Desc - ftpuser

User 2 - vo1um

User 2 Desc - ftpuser /mnt/mnt/cache/Applications/Apache/www

 

user 1 works, user 2 does not.

 

ive tried restarting the plugin, and reinstalling

 

 

User 2 FTP:

Status:	Connecting to 10.16.0.3:21...
Status:	Connection established, waiting for welcome message...
Status:	Insecure server, it does not support FTP over TLS.
Command:	USER vo1um
Response:	331 Password required for vo1um
Command:	PASS **********
Response:	530 Login incorrect.
Error:	Critical error: Could not connect to server

Link to comment

Are you sure the path in the description of the second user is correct?

 

/mnt/mnt/ seems wront to me. Please try with only one /mnt/.

 

Don't forget to restart ProFTPd after changing the description.

 

that was it, thanks for the second set of eyes.

 

weird though, i copied the directory from the ftp program

Link to comment
  • 3 weeks later...

I hope this is an easy question to answer (and for me to setup)  :)

 

Am i right in thinking that the "Webserver available"part of this plugin allows the daemon to be controlled via a gui like ProFTP Administrator?

 

If that is the case, then is there a guide to getting it to work? I see that there is a field (Webserver Path:). Do i simply download the files for a webgui admin and point the plugin to that?

 

Or is it more complicated than that?

Link to comment

No and yes. The only sophisticated gui for ProFTPd I found is gadmin-proftpd. That requires gtk support and that has a lot of dependencies on unraid and still requires another pc and x11 forwarding to access the gui. I experimented with that, but its not something that could be easily added to a plugin. Maybe with docker it will come a time that makes it possible.

 

What the config editor gives you at the moment is a textbox, in which you can edit the proftpd.conf file. So you don't need to use an editor on the command line, but can edit it in the webbrowser window. Also it will check the file after you made changes and if there are errors, it'll report the error and the line so you can fix it before saving.

 

If you still want the config editor, you need a webserver on your unraid. On v6 the easiest way is this plugin. The plugin requires you to set a webserver root path and port. Then you point the ProFTPd plugin to that path and port. The editor files will be copied to that path and the editor window will appear on the settings page.

 

If you want to install ProFTP Administrator to this webserver that will work. But you will also need to install sql or maria db on your unraid, as ProFTPd Administrator uses a sql database  to manage users. Again this whole setup is possible but a hassle to get it going. And in my opinion the gui has too few features to justify the work. :)

Link to comment

It should be possible. The proftpd doku says this.

 

So basically if you want to limit a single user, you should use the TransferRate command with user directive in your proftpd.conf file.

 

#Download Limit 640 KB (5 Megabit)
TransferRate RETR 640 user SlrG
#Upload Limit 640 KB (5 Megabit)
TransferRate STOR,STOU 640 user SlrG

 

The limit will only apply to the given user.

 

cheers,

 

SlrG

Link to comment
  • 3 weeks later...

Hi SlrG,

 

Is it possible to use virtual directories.

I don't want to give the ftp user access to all the shares i have on my server only to a couple of them.

 

I have setup the ftp user with the description "ftpuser /mnt/cache/proftpd/mediaserverftpuser" is it possible to get the shares i want to allow acces to as virtual directories underneath the path "/mnt/cache/proftpd/mediaserverftpuser" or do i need to point the users root folder to "/mnt/user" and setup the rights for the folders (shares) for each folder in the proftp.conf file?

 

Thx for the plugin it works great.

Link to comment

In the plugins folder there are two scripts mountscript.sh and unmountscript.sh. The first one is executed when the array starts and the last one, before it goes offline. They contain an example each, on how you can mount/unmount directories/shares to/from another dir. Using those you should be able to achieve your goal. If you have problems, feel free to ask again. :)

 

I'm glad you like the plugin. :)

Link to comment
In the plugins folder there are two scripts mountscript.sh and unmountscript.sh. The first one is executed when the array starts and the last one, before it goes offline. They contain an example each, on how you can mount/unmount directories/shares to/from another dir.

 

Consider to put this info in the read.me file

 

I put my shares there and in the unmound like the samples you gave and it works like a charm, thx very much.

 

Link to comment

Just FYI - Just tried to install the plugin.  Got the following error when running installation from unraid install plugin (Evidently the file fales MD5 check.):

 

plugin: installing: https://raw.githubusercontent.com/SlrG/unRAID/master/Plugins/ProFTPd.plg
plugin: downloading https://raw.githubusercontent.com/SlrG/unRAID/master/Plugins/ProFTPd.plg
plugin: downloading: /tmp/plugins/ProFTPd.plg ... done
Cleaning up previous install files...
Executing selfremoval commands if present...
...Cleanup complete!
Downloading any missing plugin files...
Latest plugin control files downloading
/tmp/ProFTPd-script: line 137: 1676 Segmentation fault wget --no-check-certificate -qO "$CTRLFILES" "https://github.com/SlrG/unRAID/raw/master/AppSupport/ProFTPd/ProFTPd-SlrG-Control-1.0.tar.gz"
...Downloaded plugin control files have failed MD5 check. Deleting and aborting install
plugin: run failed: /bin/bash retval: 1

 

Downloaded the file from github, installed with installplg and it installed.  In settings ProFTPd had an update which ran without error.  Here's the output.

 

root@HunterNAS-6:/mnt/cache/appdata# installplg ProFTPd.plg
plugin: installing: ProFTPd.plg
Cleaning up previous install files...
Executing selfremoval commands if present...
...Cleanup complete!
Downloading any missing plugin files...
         Latest plugin control files downloading
         Plugin control files have passed MD5 check
         Latest plugin dependency files downloading
         Plugin dependency files have passed MD5 check
...Downloading complete!
Running install script for ProFTPd...
         Installing plugin control files
         Installing plugin dependency files
         Detect if MySQL/MariaDB is installed...
         Move Config Editor archive to plugin dir...

+==============================================================================
| Installing new package /tmp/ProFTPd-inst/install-B/ProFTPd-x86_64.tgz
+==============================================================================

Verifying package ProFTPd-x86_64.tgz.
Installing package ProFTPd-x86_64.tgz:
PACKAGE DESCRIPTION:
Executing install script for ProFTPd-x86_64.tgz.
Package ProFTPd-x86_64.tgz installed.


Disable builtin FTP-Server...
Restart inetd to apply change...
Starting Internet super-server daemon:  /usr/sbin/inetd
Disable icon of builtin FTP-Server...
Remove example config file...
Symlink new config file...
ProFTPd is disabled. Please enable before starting.
         Cleaning up temp files/folders
...Install complete!
plugin: installed

 

Setup config, works like a champ.  Thanks for the plugin!

Link to comment

Hmm... The first error looks like the automatic download during plugin installation failed. The file became broken and thus failed the md5 check. The  plugin then aborts install. As your manual download of the plugin and installing by installplg (which will trigger the same automatic download) worked, it propably would have worked too, if you tried a second time with unraid install plugin on the webpage.

 

As you are on v6 installation using the webpage to install plugins is the recommended method. I don't know at the moment, if installing with installplg could leed to the error you see under plugin file install errors. I'll have to check that later, when I have access to my testing VMs. But if the plugin works correctly now, and is shown as installed under "Installed Plugins" with options to update and remove it, I doubt the error is caused by my plugin. It seems to be an dynamix problem. But I'll test and report back later.

 

edit:

I tested installing with installplg and it works without problems. For me there are no errors generated. No plugin file install errors tab appears. So I'm somewhat at a loss and dont't know what is the reason for your problems. :(

Link to comment

Hmm... That doesn't look correct. Did you uninstall my ProFTPd plugin? If not, even after installing with installplg, it should show on the plugins tab. I can't reproduce the error on the plugins install errors tab. Maybe you could ask the developer of dynamics (bonienl) what could cause it.

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.