Defcon1 Logo

Download GLFTPD : Click Here

UPDATE NOTES : Version 4.0
 If you are getting an error trying to find libwrap.so.7.

to solve this, I just: cp /usr/local/lib/libwrap.so.7 /usr/lib
 

GLFTPD 1.13.x Installation: For FreeBSD 2.2.x - 3.0

Once you have the glftpd downloaded, do the following items below step by step.


1. gunzip glftpd_FBSD_v1.14.5.tgz  (or use gzip –d glftpd_FBSD_v1.14.5.tgz) 
This leaves you with a file called glftpd_FBSD_v1.14.5.tar

2. tar -xvf glftpd_FBSD_v1.14.5.tar
I got 2 error messages when doing this but didn't cause any problems. Later on in step 4 and 5 we will take care of this manually. The messages are as follows:

     glftpd_FBSD/dev/null
     
tar: Could not make glftpd_FBSD/dev/null : Operation not permitted

     glftpd_FBSD/dev/zero
     
tar: Could not make glftpd_FBSD/dev/zero : Operation not permitted

Important:  Now you have to su to perform the following steps.

3. mv glftpd_FBSD /glftpd
This moves the directory glftpd_FBSD to /glftpd. 




Notice: if you wish to install glftpd in the /usr file system, for example: /usr/home/glftpd then you need to put /usr/home/glftpd in the place where you see /glftpd. 

4. cd /glftpd/dev

     mknod null c 1 3; chmod 666 null

     mknod zero c 1 5; chmod 666 zero

5. cp /sbin/ldconfig /glftpd/bin

6. cp /bin/kill /glftpd/bin

7. cp /bin/date /glftpd/bin

8. cp /bin/cat /glftpd/bin

9. cp /bin/echo /glftpd/bin

10. chroot /glftpd /bin/ldconfig

Note:   Ignore the error stating that ld.so.hints does not exist . Also make sure you place a space between /glftpd and /bin
   ls /var/run/ld* Note: this is to verify that the file ld.so.hints exists.

11. mv /glftpd/glftpd.conf /etc



Note:   glftpd.conf is your daemon config file. You will need to edit this later once we are done with this install.

12. vi /etc/inetd.conf and add the following line:

glftpd stream tcp   nowait root  /usr/local/libexec/tcpd /glftpd/bin/glftpd -l -o –i

Note: You MUST have tcp_wrappers (which is in the ports collection) 2.4 or later installed for glftpd to function

13. vi /etc/services and add the following statement
    glftpdPORT/tcp

Note: PORT = the port which you want your glftpd daemon to listen on for incoming connection. The port chosen must not be reserved already by another service , so if you decide to use port 21 remember to comment out the

"ftp 21/tcp & ftp 21/udp" services by using the # symbol. Remember if you are running a web server and you comment out port 21/tcp and port/21 up your regular users will not be able to use ftp to access their web accounts.

At this stage you need to restart your inetd or reboot the machine using shutdown –r now. Restarting the inetd will allow you to stay connected to the internet. To restart the inetd use the command kill –HUP <inetd pid>.

Congrats, if you've done all of the above correctly, then you now have glftpd installed.

Now its time to log in for the first time, For your first login you are going to type the following:

ftp localhost <port>
( Note: port is the same number you chose for glftpd service in step 12. )

( Note: Use of localhost IS required. Default ip mask for user glftpd is *@127.0.0.1)

<login>: glftpd

<password>: glftpd

Now its time to create your own account:

site adduser <login> <password>

Now its time to add your hostmask or ip's to your new account :

site addip <login> < *@host > ( i.e *@127.0.0.1 )

Now its time to change your new accounts' flags to administrator :

( Note: The use of levels is obsolete and no longer supported in 1.13.x and higher versions of glftpd. Please see additions documentation provided in this package or see - http://glftpd.ml.org or http://siteop.ml.org for further information regarding this and many new changes ) site change <login> flags +1
( Note: +1 is the admin flag. See: 'site flags' for more flag options )



 

( Note : The +1 flag cannot be removed with the 'flag' option . To remove the +1 flag from the user" glftpd" you need to manually edit /glftpd/ftp-data/users/glftpd and delete the 1 flag and replace with 0 or leave blank. )

Logout and reconnect or use the 'user' option

Now its time to log in using your own account.
 

BOT SPECIFIC INFORMATION

BOT specifics:

1. Run bot from within site structure. ( ie. /glftpd/sitebot )

2. Add the supplied glftpd.tcl to the bot.

3. Edit /glftpd/bin/botscript to point to the correct bot pid file.

 

TROUBLESHOOTING:
Many problems may occur if your permission schemes are setup incorrectly . One of the most common permission related errors will occur with the use of your SiteBot.

-Make sure all executables for your SiteBot have correct permissions set.


 

-The file /glftpd/bin/stats is the only one that requires root in order to run.

"chmod 4755 stats" to allow your bot to execute this file.

MORE INFORMATION:
If you are interested in this product or simply want more information .. Please direct your browsers to http://siteop.ml.org or http://www.glftpd.com

Offical IRC channel on efnet is #glftpd

Creator of SiTEOP: MaSTeRsan

Creator of glFtpd: GreyLine

Creator of the orginal Document : Fenris-

Article by: GhostRdr   revision 1.16.99

UPDATE NOTES : Version 4.0
 If you are getting an error trying to find libwrap.so.7.

to solve this, I just: cp /usr/local/lib/libwrap.so.7 /usr/lib
 

ghostrdr@defcon1.org

Freebsd

This site cannot be duplicated without permission.
   This site is Copyright © 1998-99 Defcon1.Org

Updated July 03, 2000