Tutorial: Installing GLFTPD on GentooX

Talk about anything related to Gentoox or Gentoo.
Post Reply
Posts: 5
Joined: Sun Oct 30, 2005 12:42 pm

Tutorial: Installing GLFTPD on GentooX

Post by CraiZE » Sun Oct 30, 2005 12:46 pm

I wrote this small tutorial some time ago for myself and thought i'd share it with others :)

And if you ask yourself "Why?" Simply because GLFTPD is compatible with unleashX and Avalaunch too. So if you have a Media Server (like i do), they can not only watch the media through CCX in XBMC, but aswell leech the media from within their dashboard ;)

Hence why i switched over to GLFTPD and dislike ProFTPD :) (which by the way doesnt work with ava, and has corrupt transfers for UX)

GLFTPD Installation for GentooX

0) Run "magic" once ;)

1) emerge'ing XinetD

First off type: emerge xinetd

This should install xinetd to your machine, once it is installed
do NOT emerge glftpd, since it wont give you the choices you want.

2) Download GLFTPD

Go to http://www.glftpd.com/ , and download the latest glftpd,
while i wrote this guide, it was 2.00, http://www.glftpd.com/files/glftpd-LNX_2.00.tgz

3) Installing GLFTPD

Once downloaded, extract its contents into /gl (you can choose any other dir)

Now : cd /gl

To get into the right Directory :)

And then: ./installgl.sh

It will ask you if you want to use TCPD, choose NO
It will ask you if you want to use a Jailed Environment, choose NO
After that it will ask the path, use glftpd, same for the service name (you can just hit enter)
For the Port, choose one, but remember, currently ProFTPD is running, so since SSH is running
on port 22, you will run it on 23 which is free ;) (since you aint running a telnet server)

For european weeks, no ;)

Cert goes into /etc (just hit enter)
Name for certificate would be glftpd (just hit enter)

It will now calculate 2 keys, which will take ~1 Minute and finish the install. So now
you will type: /etc/init.d/xinetd start

you will get something like : * Starting xinetd... [ ok ]

After that, type: telnet 23

it will then say this: 220 MY SITE NAME (glFTPd 2.00 Linux+TLS) ready.

type: USER glftpd

After it will ask the password: 331 Password required for glftpd.
type: PASS glftpd

Now you probably want to change the password, use: site chpass glftpd PASSWORD
Replace PASSWORD with your actual password...

You should get this:

200- Password Changed...
200 Command Successful.

Now since that's done, let's add a user (xbox/xbox):

site adduser xbox xbox *@192.168.0.*

This command explained:

Site = site command
Adduser = Add a user
xbox (1st) = Username
xbox (2nd) = Password
*@192.168.0.* = IDENT@IP

As you see, if you run your network on a different IP range, you should Change the IP

Now as you added the user, lets remove credit (Who needs em on a lan anyhow) :)

type: site change xbox ratio 0

And then you type: QUIT

This will disconnect you, like we intend. Now its time to actually check up which directory
you want to share, i wanted /Videos to be the Home of my FTP Site, so what i did was:

mount --bind /videos /glftpd/site/

This is pretty easy, but it wont last forever. So since i dislike that, we have to edit

nano /etc/conf.d/local.start

This will edit the file "/etc/conf.d/local.start" using nano, a very easy text editor :)

Now you have to scroll there to the very bottom, the last line should be:

rm -rf /root/.runningmagic 1> /dev/null 2> /dev/null

So now, we go into a new line and add this line:

/etc/init.d/xinetd start

But since you want aswell your directory binding to be done each time, add a 2nd line saying:

mount --bind /Videos /glftpd/site/

Now your result should look similar (your own dirs ;) ) to this:

rm -rf /root/.runningmagic 1> /dev/null 2> /dev/null
mount --bind /Videos /glftpd/site/
/etc/init.d/xinetd start

Alright, so we got that done finally! ;) (Press Ctrl + X , to save, hit "y" when it prompts you to save)

Last Step is to allow the lan to access your FTP Server and restart it, to do this we have to edit xinetd, to do this type : nano /etc/xinetd.conf

There will be a line saying:

only_from = localhost

You need to change it to:

# only_from = localhost

Aka, you comment it out ;)

Okay that done, your FTP server is almost ready, we just need to restart xinetd, which
you will do using : /etc/init.d/xinetd restart

It will show you :

* Stopping xinetd... [ ok ]
* Starting xinetd... [ ok ]

And hop! you are done ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest