proFTPd


Recommended Posts

since i don't want to hijack xbit's "hellanzb + lynix n00b = frustration" thread, i started a new thread about how to get proFTPd working on unRAID.

 

his instructions are as follows:

 

...here's what I did.  I have given root a password via the web interface and log in with that account.

 

Download proftpd version.  The latest version didn't work but this version did. http://packages.slackware.it/package.php?q=current/proftpd-1.3.1-i486-1#download

 

Add the following to the end of your go script:

installpkg /boot/packages/proftpd-1.2.10-i486-4.tgz

cp /boot/packages/proftpd.conf /etc

proftpd

 

Copy the proftpd tgz file to /boot/packages

Copy the proftpd.conf to /boot/packages

(the "packages" directory I created to store all my customization packages, you can put it someplace else if you prefer.  If you do, be sure to change the above go script as well.)

 

reboot unraid via web interface (stop, reboot) and you should have ftp access.

 

I've attached the modified proftpd.conf file you'll need to be able to log on using root.  Basically the needed changes from the default config is:

ServerType standalone

UseFtpUsers off

RootLogin on

 

thanks, xbit, i have followed these instructions (nice form creating the "packages" folder...i did the same, and moved my Midnight Commander package in there as well, changing my Go script accordingly).

 

the link you included is for the 1.3.1 download list...i downloaded and installed it via telnet, but when typing the proftpd command i got an error:

 

root@unRAID:~# installpkg /boot/packages/proftpd-1.3.1-i486-1.tgz             

WARNING: pkgtools are unstable with tar > 1.13.

        You should provide a "tar-1.13" in your $PATH.

Installing package proftpd-1.3.1-i486-1...

PACKAGE DESCRIPTION:

proftpd: proftpd (FTP server daemon)

proftpd:

proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server

proftpd: daemon.  ProFTPD grew out of the desire to have a secure and

proftpd: configurable FTP server, and out of a significant admiration of the

proftpd: Apache web server.

proftpd:

Executing install script for proftpd-1.3.1-i486-1...

 

root@unRAID:~# proftpd

- mod_tls/2.1.2: compiled using OpenSSL version 'OpenSSL 0.9.8g 19 Oct 2007' headers, but linked to OpenSSL version 'OpenSSL 0.9.8d 28 Sep 2006' library

- Fatal: unable to load module 'mod_tls.c': Operation not permitted

 

 

is that what you referred to when you said "The latest version didn't work", because in then realized that in your Go script you had installpkg /boot/packages/proftpd-1.2.10-i486-4.tgz.

 

so i downloaded the 1.2.1 version...since i'm in the middle of a big copy operation i couldn't reboot to clear the install...instead i just pushed my luck and did the telnet install of 1.2.1 over the new version, but got this response:

 

root@unRAID:~# installpkg /boot/packages/proftpd-1.2.10-i486-4.tgz

WARNING: pkgtools are unstable with tar > 1.13.

        You should provide a "tar-1.13" in your $PATH.

Installing package proftpd-1.2.10-i486-4...

PACKAGE DESCRIPTION:

proftpd: proftpd (FTP server daemon)

proftpd:

proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server

proftpd: daemon.  ProFTPD grew out of the desire to have a secure and

proftpd: configurable FTP server, and out of a significant admiration of the

proftpd: Apache web server.

proftpd:

Executing install script for proftpd-1.2.10-i486-4...

 

root@unRAID:~# proftpd

 

 

 

- getaddrinfo 'unRAID' error: Temporary failure in name resolution

- warning: unable to determine IP address of 'unRAID'

- error: no valid servers configured

- Fatal: error processing configuration file '/etc/proftpd.conf'

root@unRAID:~#

 

 

is this because i didn't reboot and the mix of 1.3.1 and 1.2.1 are now screwy, or is there something in the config file i have to change to make proFTPd aware of my unRAID server's IP address (it's static and set to 192.168.0.6)?

 

i'll have to wait another hour until i can reboot, so maybe it will fix itself after running the Go script on a clean system.

 

thanks so much for that pointer so far...this is a lot easier than i thought (i anticipated the whole slackware/modding path).

hope someone gets you taken care of on the hellaNZB end soon.

Link to comment

naw, same thing...after a reboot i get the same error message:

 

root@unRAID:~# proftpd

- getaddrinfo 'unRAID' error: Temporary failure in name resolution

- warning: unable to determine IP address of 'unRAID'

- error: no valid servers configured

- Fatal: error processing configuration file '/etc/proftpd.conf'

root@unRAID:~#

 

so i suspect that the proftpd.conf file needs to be further modified for my particular setup? i looked at all the parameters, but nothing stuck out pertaining to

url/ip addess...any ideas?

Link to comment

Those last messages seem to indicate you do not have a name-server identified. (are you using FIXED IP addresses? and not getting an IP address and name server assigned by your router)

 

You can add two more lines to your "go" script to set these before invoking your FTP server process.

 

echo nameserver 192.168.0.1 >/etc/resolv.conf

echo 192.168.0.100 unRAID >>/etc/hosts

 

Of course you will need to substitute the correct two IP addresses for your nameserver and for your unraid server instead of 192.168.0.1 and 192.168.0.100 in the example given above.

 

Joe L.

Link to comment

 

Oh man, sorry I linked in the wrong version!  I did a search on slackware.it for the file I used and just copied the results and didn't look close enough to see that it wasn't the correct version.  I'm glad you spotted it though. 

 

I'm not sure why you're seeing the problem that you have and neither I nor Søren got them.  Hopefully Joe's suggestion will fix it for you.  I do not have those lines in my go script, but perhaps my router is taking care of assigning name/ip automatically (it should be) and yours is not.  I did a little searching of your error and it all seems to be related to the /etc/hosts not containing the machines name/ip. For example:

http://www.linuxquestions.org/questions/linux-newbie-8/proftpd-proftpd-startup-failed-191619/

Link to comment

ha! it works!! as per Joe's suggestion i typed:

 

root@unRAID:~# echo nameserver 192.168.0.1 >/etc/resolv.conf

root@unRAID:~# echo 192.168.0.6 unRAID >>/etc/hosts

 

as you correctly noticed, i use a static IP on my unRAID.

 

i haven't executed this per the Go script yet because i'm in the middle of a big copy action, but i guess if it works at the telnet prompt, it should work as part of the system startup.

 

very, very cool...thanks so much xbit and Joe...the main reason i think FTP will be great is because with such good FTP clients like "Transmit" on OSX or "SmartFTP" on the Windows, one can easily move/copy/change files and directory structures on the unRAID while avoiding one of those unRAID -> Source -> unRAID bottlenecks some people keep running into while arranging their files...not everyone feels comfortable with the terminal...i'm not, for one.

 

i'm lovin' this thing mo by the day :)

Link to comment

 

Glad to hear you got it working!  The reasons you gave for installing ftp is the very reason I installed midnight commander.  If you use 'putty' to telnet it recognized mouse input.  In my case I needed ftp because my "xp home" laptop refused to see my towers samba share.  After spending dozens of hours trouble shooting, I went the ftp rout which works fine for my needs.  I also have the option if I ever need access to my tower from outside my network I can configure my router to port forward to the tower to gain access.  I'm not comfortable leaving that on all the time, but if there's ever a need in the future it's nice to know I could do it.

Link to comment

yeah, i saw that you had posted about the mouse-awareness via putty in another thread...i tried that, because i also wanted to use MC like that, but found that neither my OSX Leopard nor my XP laptops have putty installed...i googled it and saw all this stuff about Darwin-Ports, and decided to just re-visit the idea of FTP instead...i'll get putty figured out as well, i'm sure, but in the meantime - especially while migrating almost 10TB of data to the unRAID - i can work with side-by-side FTP windows open.

 

btw, is there a GUI for administering proFTPd (such as creating users/groups)? i found a couple online, put they seem to require Apache/PHP.

Link to comment

Hi,

 

Xbit and Tillkrueger, have you been doing anymore configuration of proFTPd?

 

I have been reading and reading on http://proftpd.org but I can't get what i want to work.

 

I would like to have a "admin"-user who can browse everything on my unRAID - I can do that with the "root" account so thats okay.

 

Then I would like to have another account who are locked in his home-dir and this account has to logon with id AND password...

 

I was thinking of using this extra account for my parents-in-law who are farmers and they DON'T backup their (buisness) data. I want them to backup to a external USB-drive (they already got) AND to my unraid. Then the data are would be backuped local and off location.

 

This ftp-server is nok quite as easy as setting up an ftp-server for windows  ???  :)

 

I hope someone more Linux/proftpd-aware can help  :) :)

 

Cheers

Søren

Link to comment

no, i haven't spent more time on that either as i quickly realized the same thing as you...i'm not command-line savvy and will just have to wait until we get an Apache server on unRAID, at which point we probably could get the web-based proFTPd Admin interface working...until then i'll just have to use one of my other computers to manage FTP...sorry i can't be of more assistance for the moment.

Link to comment

http://www.proftpd.org/docs/howto/Chroot.html

 

This configuration directive may appear in the <VirtualHost>, <Global>, and the "server config" (meaning not in any <VirtualHost> or <Global> sections) configuration contexts. The most common configuration requested is to restrict users to their home directories, which can be done simply by adding the following line to your proftpd.conf:

 

  DefaultRoot ~

 

The ~ (tilde) is a Unix-ism that is expanded to the logging-in user's home directory. For slightly more complex setups, administrators may want to restrict only a subset of their users into home directories (or some other directory), but leave some privileged users unrestricted. For example, say you have your privileged users all as members of a group called ftp-special. The DefaultRoot's optional second parameter, a group-expression, can then be used, like so:

 

  DefaultRoot ~ !ftp-special

 

This says to chroot() every user who is not a member of group ftp-special to their respective home directory, and:

 

  DefaultRoot /path/to/dir group1,group2

 

will chroot() users who are members of both group1 and group2 into /path/to/dir. More complex group-expressions can be used as needed.

 

Note that the execute bit (--x) must be on in order to chroot() a user into that directory. This bit is also needed for a user to be able to chdir into that directory.

 

Link to comment
  • 9 months later...

Hello, I am trying to install proftpd and was doing some research in terms of what package to use in Unraid.  I ran into a conflict in a post concerning the version number which currently works in unRAID (xbit says to download v1.3.1-1 but includes the scripts for 1.2.10)

 

Can anyone who has tried this please clarify which is the correct version to use with unRAID v4.3.3?

 

Cheers,

 

Matt

Link to comment

I have figured out the answer to my previous problem....

 

I have created a unmenu-package.conf file for the installation of ProFTPD v1.2.10 and have included xbit's proftpd.conf.  I have tested the download and installation and both went smoothly on my system.

Place both files in the /boot/packages/ dir and run from unmenu package manager.

 

Now that I have proftpd installed, i am having a problem with its operation... curretnly when i log in, I can see the data drives and user folders.  Opening those will reveal the user share folders (int he drives and user folder).  However when i open a particular user share in any of the drive/user folder I see nothing.  is there a reason I cannot see anything "deeper" than my user share folders via my ftp client?

 

Cheers,

 

Matt

 

PS big thanks to xbit for the installation instructions and pre-configured proftpd.conf file and

Link to comment

Thank you.  I've created an Add On Packages section to the UnRAID Add Ons wiki page, and added ProFTPD as the first added package.  More need to be added there.  Not sure if this is the best way to catalog the packages.

Since BubbaQ has indicated he wanted to use the same packages in a similar package management tool in BubbaRaid, keeping the packages themselves separate is a probably a good approach.
Link to comment
  • 3 months later...

I've been trying to get proFTPd working for the last 2 days but I keep running into the same problem as Biggy2872 where I cant get any deeper than the first folder or download any files even from the very first folder. It just says "DOWNLOAD FAIL" in the syslog. Started out using the 1.2.10 version but have now moved on to the 1.3.2 version since it seems to work just as well on unRAID 4.4.2 (even if I still cant get any files or navigate any depper). A few observations are:

 

I cant WRITE files without a problem but these then dissapear instantly from view and access.

I can not see folders any depper than the first folder (aka ftp://ip/disk1 I can still see stuff but not in ftp://ip/disk1/folder1)

I cant download any file, even in the disk1 folder (assume its the same problem preventing me from seeing any deeper)

The login seems to work, the FTP client used does not matter (IE, FF, FileZilla etc) and the version of proFTPd also seems irrelevant.

Currently only tried using the proftpd.conf file posted by xbit and a modifed 1.3.2 proftpd.conf file.

 

I currently suspect the problem is with the server wanting to run as the user "nobody" and the group "nogroup". I can imagine this conflicing with the unRAID Basic licence which is what I'm using for my current setup. If there is a way to run the server as root with one of the built in groups I guess this hurdle could be dealt with. Hoping for a reply by some savy user.

Link to comment
  • 3 months later...

*edit* Thought I had this solved but now my server is behaving like yours Zeiva.... this will require more work. :P

 

*update* .... 5 minutes later.

 

Zeiva, I am using FileZilla as my FTP client. Under the "Server" option on the menu bar there is a setting called "Force showing hidden files".  When you enable this all of your files magically appear.

 

 

*update 2*

 

This setting only works with files I have set to 777.  I would suggest the running the following command line:

 

"chmod 777 /mnt/* -R"

 

This will modify the file permissions for every file / folder in the /mnt directory (where all of your drives are appear) to have universal file permissions, meaning that anyone who can access the drive can do anything with the files.  I would setup your FTP to restrict users coming from your router subnet or even specific IP addresses and also make sure that you can modify file permissions in FTP otherwise your new directories will disappear on you.

Link to comment
  • 3 years later...

Sorry to reopen an old thread, but just wanted to report that the proftpd installer in unmenu doesn't play well with unRaid 5 rc12a

 

Per this thread re the plugin version of proftpd, ssl is missing.

 

http://lime-technology.com/forum/index.php?topic=25695.45

 

Installing openssl via unraid doesn't fix the problem.

 

Note the unknown version on the proftpd setup screen.  (this is from the plugin version)

 

Also checking the version of proftpd from the unMenu install gives:

 

root@Tower:/etc# /etc/rc.d/rc.proftpd getver app local
-bash: /etc/rc.d/rc.proftpd: No such file or directory

 

retracted, see below...

CaptureProFTPd.PNG.4b1c25a199416f0b10448b9374070bdf.PNG

Link to comment

Sorry to reopen an old thread, but just wanted to report that the proftpd installer in unmenu doesn't play well with unRaid 5 rc12a

 

Per this thread re the plugin version of proftpd, ssl is missing.

 

http://lime-technology.com/forum/index.php?topic=25695.45

 

Installing openssl via unraid doesn't fix the problem.

 

Note the unknown version on the proftpd setup screen.  (this is from the plugin version)

 

Also checking the version of proftpd from the unMenu install gives:

 

root@Tower:/etc# /etc/rc.d/rc.proftpd getver app local
-bash: /etc/rc.d/rc.proftpd: No such file or directory

Sorry to say, if installed from a plugin (as you seem to have done to have a GUI screen) then it probably will not have the files expected from an unMENU install.

 

Joe L.

Link to comment

This shows unmenus proftpd doesn't have a rc.proftpd like my plugin has - it propably doesn't need it. You are trying a command from my plugin with unmenu, which will obviously fail.

 

If unmenus proftpd install fails, it is not because of this command. You'll have to post a full log or nobody will be able to help you.

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.