ProFTPD Plugin for unRAID v6.8.x


SlrG

Recommended Posts

It should be no problem I think. It's only a check for a working internet connection as this is needed to pull down all the packages necessary to run the plugin. The question is now, if the plugin installed correctly because of the dns problems. Can you please post a screenshot of the plugins settings page and the full system log?

Link to comment

Quick question.

 

So i was up north recently and lost access to my FTP.

Wife said we had a blackout.

Server shutdown cleanly, thank you UPS.

However when it came back up, the FTP was off by default.

Had to manually start it again via the web gui.

 

Is this by design or do i possibly have a configuration error some place?

Link to comment

Please check the proftpd plugins settings page. On the right side in the configuration section, there is a setting "Enable ProFTPd". If you have set this to enable, the proftpd service will be restarted when the server restarts. If you already have this option enabled please try to manually restart the server and check if it proftpd gets enabled now. If it does not, please report again.

Link to comment
  • 2 weeks later...

Hmm... Nothing unusual in the logs. :( How do you "powercycle"? When you go to the plugins settings page after restarting the server, what is reported as status of the proftpd process? Does it show Running or Stopped? Please go to the command line (before starting the service manually) and tell me the result of

/etc/rc.d/rc.ProFTPd start

Did you try to set the service to disabled, applied it and then set it back to enabled?

Link to comment

Hmm... Nothing unusual in the logs. :( How do you "powercycle"? When you go to the plugins settings page after restarting the server, what is reported as status of the proftpd process? Does it show Running or Stopped? Please go to the command line (before starting the service manually) and tell me the result of

/etc/rc.d/rc.ProFTPd start

Did you try to set the service to disabled, applied it and then set it back to enabled?

 

Power Cycle like this:

Main -> Dashboard-> Array Operation-> Check Stop (click stop) -> Reboot/Power Down

 

After reboot

 

Settings-> ProFTPd->  Status: STOPPED

 

JaY_III@unRAID:~# /etc/rc.d/rc.ProFTPd start
Renewing userjail...
...OK
Starting ProFTPd...

...OK
JaY_III@unRAID:~#

 

Settings-> ProFTPd-> Status: RUNNING with version: 1.3.6rc1

 

Yes at one time I did set the service to disabled when I was testing VM's.

I have since re-enabled the service. That was all done here:

Settings-> ProFTPd-> Configuration-> Enable ProFTPd : Yes/No

Link to comment

Can you try to uninstall my plugin, reboot and reinstall it? If it doesn't start working then, would you be willing to do a TeamViewer session where I can have a look at your server and try to figure out what is going wrong?

Link to comment

Can you try to uninstall my plugin, reboot and reinstall it? If it doesn't start working then, would you be willing to do a TeamViewer session where I can have a look at your server and try to figure out what is going wrong?

 

Plugin uninstalled

System Rebooted

Plugin Reinstalled

Settings-> ProFTPd-> Status: STOPPED

Configuration: Enable ProFTPd: Yes -> Apply

Status: RUNNING with version: 1.3.6rc1

System Rebooted

Status: RUNNING with version: 1.3.6rc1

restored my settings

System Rebooted

Settings-> ProFTPd-> Status: STOPPED

 

mountscripts.sh or ProFTPd.conf must be the issue

 

uninstall /reinstall

restored only mountscript.sh

reboot

Status: RUNNING with version: 1.3.6rc1

 

restored ProFTPd.conf (with restored mountscript.sh)

reboot

Status: STOPPED

Suspect issue with ProFTP.conf is preventing the FTP from auto starting

 

reboot with only ProFTP.conf restored

Status: STOPPED

 

 

So it is 100% something to do with my ProFTP.conf file.

If I make any changes to it I can not get the server to auto start

 

proftpd.conf

Link to comment
  • 2 months later...

I never tried it myself, but I think you can do this using the <limit> directive.

<Directory ~/site/backups>
   <Limit WRITE>
      DenyAll
   </Limit>
</Directory>

Adding this to your proftpd.conf will protect the given dir against all writes. If you want to protect your whole server your could add only the limit without the directory directive. It will block write access for all users however. It is possible to allow it for certain users and block it for others. Please check out the proftpd docs.

Link to comment

I understand this is a tool for more advanced users, but in the current ransomware climate, wouldn't it be better to reverse the model here to be basically read-only, then only allow write access in limited windows (selected users, selected folders)?  Seems like that would be safer, especially in any proftpd.conf files provided for new users.  Might be a better model for all of us, to always think that way now (read only unless absolutely necessary, then limited)!

Link to comment

The documentation is pretty clear on how to setup file permissions.

And as the user is already forced to edit all the config files, I don't think that is required to default to read only.

 

Here is an example of how I like to setup the FTP.

 

Step 1: Edit mountscript.sh

 

# Mounts just media for read only
# Directory Structure
mkdir /tmp/FTP/
mkdir /tmp/FTP/Media
mkdir /tmp/FTP/Media/Video
mkdir /tmp/FTP/Media/Audio
mkdir /tmp/FTP/Media/E-Book

mount --bind /mnt/user/Media/Videos /tmp/FTP/Media/Video
mount --bind /mnt/user/Media/Music /tmp/FTP/Media/Audio
mount --bind /mnt/user/Media/e-book /tmp/FTP/Media/E-Book

# Mounts for Apps/Tools/ISO ect
# Apps and Tools are Read only 
# Uploads are Read/Write
mkdir /tmp/FTP/Apps
mkdir /tmp/FTP/Uploads

mount --bind /mnt/user/Backup/apps /tmp/FTP/Apps
mount --bind /mnt/user/Uploads /tmp/FTP/Uploads

 

What I have done in Step 1 is create the file structure that will be presented to my FTP users.

I am using the /tmp directory so i do not need to use the unmount script.

If you do not create your site in the /tmp directory, you must unmount all your shares.

I find this simpler as an improper unmount will hang the shutdown.

 

Also note file permisions are not actually set yet.

 

I will do that in step 2:

 

edit proftpd.conf

#File Permissions
<Directory /tmp/FTP/Media>
<Limit WRITE>
DenyAll
</Limit>
</Directory>

<Directory /tmp/FTP/Apps>
<Limit WRITE>
DenyAll
</Limit>
</Directory>

 

Next you will want to Jail your FTP users into the /tmp/FTP/ directory you have created

 

In unRAID under Users -> Add User

Create your user and add this in the discription:

ftpuser /tmp/FTP/

 

Now when the user logs in they will be presented with 3 directories that look like this:

 

Apps (read only)
Media (read only)
Uploads (read / write)

 

Final Step

Login as the user you have created and ensure they have access to what you want to allow.

If you find the JAIL is not working and they have access to / on your system, you will need to restart the daemon as I believe the jails are actually setup for the users when the deamon is first started and can not be changed while running.  So new users will not be properly jailed.

 

 

Link to comment

hey guys!

 

i'm in a need soon to have a SFTP server running and ideally that would be on unRAID (because of data storage). i heard of ProFTP (by name) quite often for some time and it seems to be a perfect fit. but, as a quick read brought up,  enabling the secure protocol seems to be a little bit of a challenge.

 

maybe someone here did that already and could give a little bit of feedback?

 

i've no problem with fiddling through .config files and adjusting values, etc. but because of not having used ProFTP myself, for sure there are some tipps around (or maybe someone documented that journey)  :)

 

thx.

Link to comment

hey guys!

 

i'm in a need soon to have a SFTP server running and ideally that would be on unRAID (because of data storage). i heard of ProFTP (by name) quite often for some time and it seems to be a perfect fit. but, as a quick read brought up,  enabling the secure protocol seems to be a little bit of a challenge.

 

maybe someone here did that already and could give a little bit of feedback?

 

i've no problem with fiddling through .config files and adjusting values, etc. but because of not having used ProFTP myself, for sure there are some tipps around (or maybe someone documented that journey)  :)

 

Did you read the post just 3 back of yours?  It seemed very clear and comprehensive to me.

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.