![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
| View Poll Results: Is this how-to useful to you ? | |||
| yes |
|
23 | 95.83% |
| no |
|
1 | 4.17% |
| Voters: 24. You may not vote on this poll | |||
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | |||||||||||||||||||||||||||||
|
A Carafe of Ubuntu
![]() |
[HOW-TO] FTP installation for example of GlFTPd
It's my first how-to in english so please don't be to severe...
go to : http://glftpd.com/ download and unpack package. Code:
cd /tmp wget http://glftpd.com/files/glftpd-LNX_2.01.tgz gunzip -c glftpd-LNX_2.01.tgz | tar -xvf - Code:
$ cd glftpd-LNX_2.01 Code:
sudo apt-get install xinetd zip unzip openssl tcpd Code:
# sudo sh installgl.sh Quote:
Quote:
Now server generate key, it've taken about 10 sec on my computer and about 2 minutes in old version of glftpd. Probably You'll receive error like that: Code:
Restarting inetd . . . Failed! You must restart inetd before using glftpd. Code:
$ sudo apt-get install inetd Czytanie list pakietów... Gotowe Budowanie drzewa zależności... Gotowe Uwaga, wybieranie inetutils-inetd zamiast inetd Zostaną zainstalowane następujące NOWE pakiety: inetutils-inetd 0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 85 nieaktualizowanych. Konieczne pobranie 37,6kB archiwów. Po rozpakowaniu zostanie dodatkowo użyte 139kB miejsca na dysku. Pob: 1 http://archive.ubuntu.com breezy/universe inetutils-inetd 2:1.4.2+20040207-4 [37,6kB] Pobrano 37,6kB w 15s (2397B/s) Prekonfiguracja pakietów ... Zaznaczenie poprzednio niezaznaczonego pakietu inetutils-inetd. (Odczytywanie bazy danych ... 103934 plików i katalogów obecnie zainstalowanych.) Rozpakowanie inetutils-inetd (z .../inetutils-inetd_2%3a1.4.2+20040207-4_i386.deb) ... Konfigurowanie inetutils-inetd (1.4.2+20040207-4) ... Starting internet superserver: inetd. $ Code:
# nmap localhost|grep 21 21/tcp open ftp Now we need to edit config: Code:
sudo mcedit /jail/glftpd.conf Quote:
0 - yes 1 - only for admin !* - off # at the begining - server works for all Quote:
Quote:
Quote:
Quote:
Following lines leave unchanged: ----------------------------------------- Quote:
Quote:
Turn off - it makes only problems put # before line: Quote:
Quote:
Quote:
Quote:
Quote:
ex: Quote:
Quote:
Quote:
Now couple examples of additional configuration: Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
I think that's all from additional options Now we may log in (login glftpd, password glftpd). IN EXACTLY THE SAME WAY LIKE ME Code:
# ftp 127.0.0.1 Connected to 127.0.0.1. 220 MY SITE NAME (glFTPd 2.00 Linux+TLS) ready. Name (127.0.0.1:root): glftpd 331 Password required for glftpd. Password: 230- _____ 230- ______________________________|__ |____ ________________________________ 230- \ _ / _ / _ / | | _ / _ / _ / 230- \ \ / / / /____/. | | / / /____/. /_____/ 230- \________/____/ /______ |___|____|___/ /______ |____| 230- .-=----------- /____/ ---- |____| --------- /____/ ---- |____| -------=-. 230- `-=-------------------------------------------------------------------=-' 230- `-----( Type 'site onel MESSAGE' to enter your message )-----' 230 User glftpd logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> Code:
Connected to 127.0.0.1. 421 Service not available, remote server has closed connection ftp> quit Code:
echo 'IP *@*'>>/jail/glftpd/ftp-data/users/glftpd Code:
echo 'IP *@your.ip.addres.here'>>/jail/glftpd/ftp-data/users/glftpd Code:
echo 'IP *@83.141.171.241'>>/jail/glftpd/ftp-data/users/glftpd Code:
echo 'IP *@0.0.0.0'>>/jail/glftpd/ftp-data/users/glftpd Code:
$ sudo cat /jail/glftpd/ftp-data/logs/login.log Wed Nov 23 16:23:37 2005 [6585 ] *@0.0.0.0 (0.0.0.0): connection refused: ident@ip not added to any users. Wed Nov 23 16:23:48 2005 [6639 ] *@0.0.0.0 (0.0.0.0): connection refused: ident@ip not added to any users. Wed Nov 23 16:28:10 2005 [7679 ] *@0.0.0.0 (0.0.0.0): connection refused: ident@ip not added to any users. Code:
# cat /jail/glftpd/ftp-data/users/glftpd |tail -n 4 NUKE 0 0 0 TIME 1 923341886 0 0 IP *@127.0.0.1 IP *@83.141.171.241 # Code:
$ ftp 127.0.0.1 Connected to 127.0.0.1. 220 MY SITE NAME (glFTPd 2.00 Linux+TLS) ready. Name (127.0.0.1:yaro): receiving informations about glftpd user Code:
ftp> site user glftpd 200- User Comment: glftpd 200- +=======================================================================+ 200- | Username: glftpd Created: 0 | 200- | Added by: Expires: Never | 200- | Time On Today: 00:00 Last seen: Thu Apr 21 14:44:15 2005| 200- | Flags: 1 Idle time: Disabled | 200- | Ratio: 1:3 Credits: 4.9 MB | 200- | Total Logins: 2 Current Logins: 1 | 200- | Max Logins: 2 From same IP: Unlimited | 200- | Max Sim Uploads: Unlimited Max Sim Downloads: Unlimited | 200- | Max Upload Speed: 0.0 K/s Max Download Speed: 0.0 K/s | 200- | Times Nuked: 0 Bytes Nuked: 0 MB | 200- | Weekly Allotment: 0 MB Messages Waiting: N | 200- | Time Limit: 0 minutes. (0 = Unlimited) | 200- | Tagline: Glftpd default user | 200- | Groups: | 200- | Priv Groups: | 200- +-----------------------------------------------------------------------+ 200- | IP0: *@127.0.0.1 IP1: *@0.0.0.0 | 200- | IP2: IP3: | 200- | IP4: IP5: | 200- | IP6: IP7: | 200- | IP8: IP9: | 200- +=======================================================================+ 200 Command Successful. ftp> Additionally You can see flag "1" mentioned above. Description of all flags: Quote:
Let receive information about existing users: Code:
ftp> site users Code:
ftp> site adduser 200- .-------------------------------------------------------. 200- | USAGE: SITE ADDUSER <username> <password> <IP#1 - 5> | 200- | | 200- | <username> The username to add. | 200- | <password> The password to set for this user. | 200- | <IP#1 - 5> Optional: Up to 5 ips may be specified here. | 200- | | 200- | After you add a user, use "SITE ADDIP" to add IP's to | 200- | the new account. | 200- `-------------------------------------------------------' 200 Command Successful. ftp> site adduser test test *@* 200- User created, now adding IPs... 200- IP '*@*' successfully added to test. 200- 200 User (test) successfully added. ftp> Code:
ftp> site change
200- -----------------------------------------------------------
200- SITE CHANGE <username> <field> <value>
200- SITE CHANGE { <user1> <user2> } <field> <value>
200- SITE CHANGE =<group> <field> <value>
200- SITE CHANGE * <field> <value>
200- -----------------------------------------------------------
200-
200- Fields: ratio
200- sratio
200- wkly_allotment [#,]#
200- max_dlspeed
200- max_ulspeed
200- max_sim_down
200- max_sim_up
200- timeframe # #
200- credits
200- flags
200- homedir
200- idle_time
200- startup_dir
200- num_logins # [#]
200- time_limit
200- tagline
200- comment
200- expires [yyyy-mm-dd]
200- -----------------------------------------------------------
200 Command Successful.
ftp> site change test max_sim_down 1
200 Command Successful.
ftp> site change test flags +1
200 Command Successful.
ftp>
Code:
ftp> site user test 200- User Comment: Added by glftpd 200- +=======================================================================+ 200- | Username: test Created: 04-21-05 | 200- | Added by: glftpd Expires: Never | 200- | Time On Today: 00:00 Last seen: Thu Apr 21 14:52:41 2005| 200- | Flags: 13 Idle time: Disabled | 200- | Ratio: 1:3 Credits: 14.6 MB | 200- | Total Logins: 0 Current Logins: 0 | 200- | Max Logins: 2 From same IP: Unlimited | 200- | Max Sim Uploads: Unlimited Max Sim Downloads: 1 | 200- | Max Upload Speed: 0.0 K/s Max Download Speed: 0.0 K/s | 200- | Times Nuked: 0 Bytes Nuked: 0 MB | 200- | Weekly Allotment: 0 MB Messages Waiting: N | 200- | Time Limit: 0 minutes. (0 = Unlimited) | 200- | Tagline: No Tagline Set | 200- | Groups: | 200- | Priv Groups: | 200- +-----------------------------------------------------------------------+ 200- | IP0: *@* IP1: | 200- | IP2: IP3: | 200- | IP4: IP5: | 200- | IP6: IP7: | 200- | IP8: IP9: | 200- +=======================================================================+ 200 Command Successful. ftp> Lot of information You can find in file /jail/glftpd/docs/glftpd.docs In practise You may (it's up to You) chmod everything in /jail/glftpd/site to 777 because server control access rights by itself. Otherwise You need to take care of this rights for server (reading, writing etc access) If You wan't to share some directory located outside /jail/glftpd/site (Do You remember Quote:
mount --bind /source/directory/ /jail/glftpd/site/target/directory/ and add this entry for example to /etc/rc.local serwer ma wiecej mozliwosci niz bedziemy kiedykolwiek potrzebowac.... All accesible commands You may receive after invoking command: Code:
ftp> SITE HELP please forgive me my poor english.... Added on 29/06/2007: Quote:
Code:
############################################################################## ################## THE RIGHTS SECTION BEGINS HERE #################### ############################################################################## # (you can use a ! in front of any group/user/flag to negate it) # # The default is no, you don't need to add "!*" at the end # # # # Function Path =GROUP or -username or X (flag) # ############################################################################## upload * -yaro -mac resume * * makedir * * download * * dirlog * * rename * 1 =STAFF filemove * 1 =STAFF renameown * * nuke * * delete * 1 deleteown * * ############################################################################## ################### THE RIGHTS SECTION ENDS HERE ##################### ############################################################################## As u can see there is group STAFF which has 2 extra rights. People in this group can rename and move (filemove) file no matter where they are (*). U can add specific rights to different groups in a same way. Also u can limit access to this right/option to spacific path. For example: Code:
makedir /path/to/directory * Now u can login to ftp and create new group. By default it can be done only by glftpd user because he's the only one who has admin flag (1) set up: Code:
ftp> site user glftpd 200- User Comment: glftpd 200- +=======================================================================+ 200- | Username: glftpd Created: 0 | 200- | Added by: Expires: Never | 200- | Time On Today: 00:00 Last seen: Fri Jun 29 14:11:55 2007| 200- | Flags: 15 Idle time: Disabled | 200- | Ratio: 1:3 Credits: 4.9 MB | 200- | Total Logins: 10 Current Logins: 1 | 200- | Max Logins: 2 From same IP: Unlimited | 200- | Max Sim Uploads: Unlimited Max Sim Downloads: Unlimited | 200- | Max Upload Speed: 0.0 K/s Max Download Speed: 0.0 K/s | 200- | Times Nuked: 0 Bytes Nuked: 0 MB | 200- | Weekly Allotment: 0 MB Messages Waiting: N | 200- | Time Limit: 0 minutes. (0 = Unlimited) | 200- | Tagline: Glftpd default user | 200- | Groups: | 200- | Priv Groups: | 200- +-----------------------------------------------------------------------+ 200- | IP0: *@127.0.0.1 IP1: *@* | 200- | IP2: IP3: | 200- | IP4: IP5: | 200- | IP6: IP7: | 200- | IP8: IP9: | 200- +=======================================================================+ 200 Command Successful. ftp> Code:
-groupcomment 1 -grpadd 1 -grpchange 1 Code:
site change USER flags +1 Code:
-grpadd 148 Code:
Flagname Flag Description ------------------------------------------------------------- SITEOP 1 User is siteop. GADMIN 2 User is Groupadmin of one of his/her groups (doesn't work for private groups). GLOCK 3 User cannot change group. EXEMPT 4 Allows to log in when site is full. Also allows user to do "site idle 0", which is the same as having the idler flag. Also exempts the user from the sim_xfers limit in config file. COLOR 5 Enable/Disable the use of color (toggle with "site color"). DELETED 6 User is deleted. USEREDIT 7 "Co-Siteop" ANON 8 User is anonymous (per-session like login). Code:
230 User glftpd logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> site help 200- --=--------------------- Available SITE commands ---------------------=-- 200- TAGLINE: Change Your Tagline 200- WKUP: Show Weektop Uploaders 200- WKDN: Show Weektop Downloaders 200- ALUP: Show Alltime Uploaders 200- ALDN: Show Alltime Downloaders 200- GPWK: Show Weektop Groups 200- GPMONTHUP: Show Month Top Groups 200- GPAL: Show Alltime Top Groups 200- GPWD: Show Weektop Group Downloaders 200- GPMONTHDN: Show Month Top Group Downloaders 200- GPAD: Show Alltime Top Group Downloaders 200- DAYUP: Today's Top Uploaders 200- DAYDN: Today's Top Downloaders 200- MONTHUP: Show MonthTop Uploaders 200- MONTHDN: Show MonthTop Downloaders 200- TRAFFIC: Show Site Traffic 200- REQUEST: Make a Request 200- REQFILLED: Mark a Request as Filled 200- WELCOME: Show Welcome Message 200- RULES: Show Site Rules 200- USER: Show Users On Site (Type username to see users stats) 200- NUKES: Show Nukes 200- UNNUKES: Show UnNukes 200- DUPE: Search Dupe Database 200- TIME: Show Local Time 200- NEW: Show Recent Dirs 200- GROUP: Join/Leave Groups 200- ONEL: Add/View Onliners 200- MSG: Send a Message 200- WHO: See who's online 200- COLOR: Toggle Color 200- SEEN: See when a user was last on 200- LASTON: Display stats of last users online 200- SEARCH: Locate a DIR on the site. 200- PASSWD: Change Password 200- VERS: Show Daemon Version 200- STAT: Show Statline 200- IDLE: Show Minimum and Maximum Idle Timeout 200- GINFO: Detailed nfo of Groups 200- USERS: List Users on Site 200- DELIP: SITE DELIP <yourownusername> # (delete your own IP's) 200- ADDIP: Add IP To a User 200- DELIP: Delete an IP From a User 200- ADDUSER: Add User 200- DELUSER: Delete User 200- READD: Readd Deleted User 200- CHANGE: Change Field For a User 200- GADDUSER: Add User and put him in a group 200- RENUSER: Rename User 200- CHPASS: Change Another User's Password 200- GRPADD: Add group 200- GRPDEL: Delete group 200- GRPNFO: Change Group nfo 200- GRPREN: Rename group 200- GRP: Show extended group info 200- CHGRP: Change a user's group 200- GRPCHANGE: Change group settings 200- CHGADMIN: Change the gadmin(s) for a group 200- LOGINS: Login Log 200- SYSLOG: Syslog Log of User Changes 200- UPDATE: Update DirLog Database 200- PURGE: Purge Deleted Users 200 Use "SITE HELP <command>" for syntax help. ftp> Code:
ftp> site grpadd test 200 Group (test) successfully added. Code:
ftp> site CHGRP mac test 200- 'mac' has been successfully added to 'test' 200 Command Successful. Code:
ftp> site GADDUSER test newuser password *@127.0.0.1 200- User created, now adding IPs... 200- IP '*@127.0.0.1' successfully added to newuser. 200- 200 User (newuser) successfully added to group test. ftp> Code:
############################################################################ # Private Groups: privgroup GROUPNAME GROUPDESC # ############################################################################ privgroup STAFF My[:space:]Private[:space:]Group ############################################################################ # PRIVPATHS: Directories should be uniquely named (no wildcards) # ############################################################################ privpath /site/admins_only 1 privpath /site/privatedir 1 =STAFF privpath /site/privatedir2 1 =TEST privpath /site/privatedir3 1 =STAFF -yaro -mac privpath /site/privatedir4 1 =STAFF -yaro -mac =TEST Quote:
http://en.wikipedia.org/wiki/List_of_FTP_clients Last edited by Sir_Yaro; June 29th, 2007 at 09:52 AM.. |
|||||||||||||||||||||||||||||
|
|
|
|
|
#2 |
|
Gee! These Aren't Roasted!
![]() Join Date: Oct 2005
Beans: 172
|
Re: [HOW-TO] FTP installation for example of GlFTPd
well i have not read all of the guide or done anything on it cuz i am currently trying to create a fully documented compile of wine but i appreciate the effort you put into this work. keep it up. this type of stuff is why linux/ubuntu will rule the world one day.
|
|
|
|
|
|
#3 |
|
A Carafe of Ubuntu
![]() |
Re: [HOW-TO] FTP installation for example of GlFTPd
Actually it's one of my old how-tos originally wrote for mandrake linux...
__________________
Last edited by Sir_Yaro; November 23rd, 2005 at 12:04 PM.. |
|
|
|
|
|
#4 |
|
First Cup of Ubuntu
![]() Join Date: Nov 2005
Beans: 6
|
Re: [HOW-TO] FTP installation for example of GlFTPd
Nice guide
I have a problem and that is that I can not log in on localhost... I get this message " ftp: connect: Connection refused " and I have tried the install with and without tcpd enabled. Another strange thing was that on step 7(last step)of the install guide it only takes about 10-20 seconds to make the DSA parameters. 1024 semi-random bytes loaded Generating DSA parameters, 1024 bit long prime This could take some time ...........+............................+......... .....+.+............+....+........................ ..........++++++++++++++++++++++++++++++++++++++++ +++++++++++* .....+......+......+.............................. .......+.................................+........ ............+..............+++++++++++++++++++++++ ++++++++++++++++++++++++++++* 1024 semi-random bytes loaded Generating DH parameters, 1024 bit long safe prime, generator 2 This is going to take a long time .....................+............................ .............................+.................... .................................................. .................................................. ...+.................+.........+...........+...... ..............+..............+.................+.. ....+..................+.......................... .................+...............................+ .................................................. .................................................. ........................................+......... .................................+.........+...... .................................................. .......+.......................................... .................................................. .................................................. ..............................+................... ...............+..........................+....... .......+.......................................... ..............+................................... +................................................. ...+.............................................. ..................................+............... .................................................. ................................++*++*++* Generating DSA key, 1024 bits Moving ftpd-dsa.pem to /jail/glftpd//etc . . . Done And on step 8 I get another error: 8. STARTING GLFTPD: ------------------- Copying /etc/resolv.conf to /jail/glftpd/etc/resolv.conf . . . Done. Testing entries in resolv.conf (can take time): Testing 195.54.122.200 . . . OK. Testing 195.54.122.204 . . . OK. Testing 195.54.122.199 . . . OK. Testing 81.26.226.3 . . . OK. Configuring inetd for glftpd . . . Done. Restarting inetd . . . Failed! You must restart inetd before using glftpd. Adding crontab entry to tabulate site stats nightly . . . Done. And when I try and do the nmap localhost|grep 21 command nothing happens. Any suggestions what can be wrong? |
|
|
|
|
|
#5 |
|
Dipped in Ubuntu
![]() Join Date: Jul 2005
Location: olney, maryland
Beans: 532
Ubuntu 6.06 Dapper
|
Re: [HOW-TO] FTP installation for example of GlFTPd
Sir Yaro, you have to replace yaro with username. Otherwise people will just type yaro instead of their username! Or just tell them to replace yaro with their own username.
-m Dany - what I just outlined is probably your problem.
__________________
Tux Files | My Blog | My last.fm page | Record Skype Conversations
One of the core developers for Specto VIdeo Tutorial thread w/ link |
|
|
|
|
|
#6 | |
|
First Cup of Ubuntu
![]() Join Date: Nov 2005
Beans: 6
|
Re: [HOW-TO] FTP installation for example of GlFTPd
Quote:
# ftp ftp>o 127.0.0.1 port Last edited by Dany; November 12th, 2005 at 06:05 PM.. |
|
|
|
|
|
|
#7 |
|
First Cup of Ubuntu
![]() Join Date: Feb 2006
Beans: 1
|
Re: [HOW-TO] FTP installation for example of GlFTPd
I have the same problem!! Or even: I can login locally to my ftp, with either 127.0.0.1 or my real ip, but! All users that access my FTP fail the login, and this is what I see in login.log:
Users that tried to login were Bald0z, dade, glftpd All seen as 0.0.0.0 ! Code:
Tue Feb 7 15:44:51 2006 [10669 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "Bald0z" "NoGroup" "No Tagline Set" Tue Feb 7 15:46:54 2006 [10712 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "dade" "" "No Tagline Set" Tue Feb 7 15:49:02 2006 [10757 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "dade" "" "No Tagline Set" Tue Feb 7 15:50:04 2006 [10712 ] LOGOUT: *@0.0.0.0 (0.0.0.0) "dade" "" "No Tagline Set" Tue Feb 7 15:51:10 2006 [10817 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "dade" "" "No Tagline Set" Tue Feb 7 15:52:12 2006 [10757 ] LOGOUT: *@0.0.0.0 (0.0.0.0) "dade" "" "No Tagline Set" Tue Feb 7 15:54:21 2006 [10817 ] LOGOUT: *@0.0.0.0 (0.0.0.0) "dade" "" "No Tagline Set" Tue Feb 7 16:54:18 2006 [13383 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "Bald0z" "NoGroup" "No Tagline Set" Tue Feb 7 16:54:39 2006 [13383 ] LOGOUT: *@0.0.0.0 (0.0.0.0) "Bald0z" "NoGroup" "No Tagline Set" Tue Feb 7 16:54:46 2006 [13390 ] LOGIN: <UNKNOWN>@0.0.0.0 (0.0.0.0) NONE "glftpd" "" "Glftpd default user" Tue Feb 7 16:56:11 2006 [13390 ] LOGOUT: *@0.0.0.0 (0.0.0.0) "glftpd" "" "Glftpd default user" Tue Feb 7 16:57:25 2006 [13425 ] jointklat: *@0.0.0.0 (0.0.0.0): Bad user@host. Tue Feb 7 17:07:13 2006 [13580 ] jointklat: *@0.0.0.0 (0.0.0.0): Bad user@host. HELP!!! (I tried installing an ident server, as Ubuntu doesn't ship with one natively, but that didn't seem to solve the problem). Thank you |
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() Join Date: Apr 2006
Beans: 1
|
Re: [HOW-TO] FTP installation for example of GlFTPd
@Bald0z
It's not because of the ident server you are getting that kinda log files. You need to disable IPV6 since glftpd doesn't support it. Check this thread how to do it: http://www.ubuntuforums.org/showthread.php?t=87798 I had the same problem and this helped. Jaykie |
|
|
|
|
|
#9 |
|
First Cup of Ubuntu
![]() Join Date: Feb 2007
Beans: 5
|
Re: [HOW-TO] FTP installation for example of GlFTPd
Well i followed the guide but when i want to connect i get connection refused and because i'm quite new to LNX i have no idea where to look ;(
Any help from other users would help. thx in advance |
|
|
|
|
|
#10 |
|
A Carafe of Ubuntu
![]() |
Re: [HOW-TO] FTP installation for example of GlFTPd
please show output of your console
__________________
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|