Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Ftp And Mandrake....
Jim
post Jun 8 2004, 10:16 PM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



So I am new to this whole world of hosting, and I am trying to set up a basic FTP service so I can get at files on my system. The problem is I can't figuer out how to actually let me get to the files.

If I type in ftp://myip I it tells me my login is incorrect, and when I try to log in using an FTP program it just sort of sits there. Usually it says its connected, than gives me a couple errors like Password reuqiered or login incorrect and disconnects. What do I need to do?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Termina
post Jun 9 2004, 12:07 AM
Post #2


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



What FTP server are you using?

It probally won't let you log in as root as default (I usually allow root, but it's bad security. wink.gif)

So try logging in as a user. ftp://user:pass@localhost (localhost = your ip/domain... or just use localhost wink.gif)

If that doesn't work, somethings wrong with the config.

It may be using /etc/ftpusers to see who is/isn't allowed to access FTP. Change accordingly


If you want to try out ProftpD, i can give you my working config


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
Jim
post Jun 9 2004, 10:53 AM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



So I am using proftpd 1.2.9-3mdk (thats the mandrake build).

I tried doing user@ip but it keeps giving me a 530:Login Incorrect error.

I added myself to the /etc/ftpusers file.

CODE
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
jim


I don't know what else to do, I am still really confused.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 9 2004, 12:40 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



send me a pm (or e-mail) of your ftp config file and I 'll look at it and see if I can see anything....later we can clean up any info that the whole group can't see and post the results.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jun 9 2004, 09:56 PM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



where is my FTP config file? I looked in the "standard" places I found on some websights and I didn't reallly see anything. Plus it kept talking about the four config files. So what do you want?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 10 2004, 07:04 AM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



The config file is:

/etc/proftpd.conf

The standard file should allow you to get up and running ... it will be a standard FTP server that will allow all users to login ... not using passive FTP. If you have already made changes to /etc/proftpd.conf, copy it to /etc/proftpd.conf.new and then copy down the basic config like this:

mv /etc/proftpd.conf /etc/proftpd.conf.new
cp /usr/share/doc/proftpd-1.2.9/basic.conf /etc/proftpd.conf


Next, if you have a firewall setup on the Mandrake box (there is one by default), you would need to fix your firewall so you can connect incoming for FTP. If you used the default security setup, you can do it via the Mandrake Control Center in the Security - Firewall section ... check FTP server

then you would start proftpd with the command:

/etc/init.d/proftpd restart

then make it starts on reboot like this:

chkconfig --add proftpd

then do:

chkconfig --list | grep proftpd

the results should be:

proftpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off

------------------
Now, you should be able to login with any authorized user on the system.

But it is not very secure (all users can go to any directory).

You might want to setup a chroot jail for all users except one ... like this:

My system already has a directory called /var/ftp ... with a directory called /pub under it ... if you don't have one, make it like this:

mkdir /var/ftp
mkdir /var/ftp/pub
chown -R ftp:ftp /var/ftp
chmod -R 775 /var/ftp


(do the chmod command even if the directory exists)...

then inside the /etc/proftpd.conf file add these lines at the bottom:

DefaultRoot / jim
DefaultRoot /var/ftp

restart the ftpd server with the command:

/etc/init.d/proftpd restart

In this senerio, the user jim can login and go anywhere (allowed by his unix user permissions), but all other users are stuck in /var/ftp.

With the chmod command we did before (chmod -R 775 /var/ftp), only users who are in the FTP group can write to the root ftp directory OR the pub directory .... all other valid users can login, but they are read only ... make sure to add jim to the ftp group if you want him to write to the /var/ftp (and below) directories.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jun 11 2004, 01:54 AM
Post #7


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Thanks offering to do this via PM but I think we should keep it on the forum to keep the answers up. If it gets to passing anything really sensitive like IPs we can do that via PM. I couldn't host servers at school so I am just getting to learn all this.

So my ftp server was already up and running, but I did all the restart deal-bobs and what not. The chkconfig came out just as it should. But it still wont let me log in with any users.

Here is my proftpd.conf file.

CODE
# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName      "ProFTPD Default Installation"
ServerType      standalone
DefaultServer      on

# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart  on

# Port 21 is the standard FTP port.
Port    21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask    022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances      30

# Set the user and group under which the server will run.
User    nobody
Group    nogroup


# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
<Directory />
 AllowOverwrite  on
</Directory>

# Needed for NIS.

PersistentPasswd              off

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#
# DefaultRoot /home/foo foo


I didn't actually change anything. Anythoughts?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Termina
post Jun 11 2004, 04:01 AM
Post #8


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



I have this problem all the time when I add a new user manually, and try to use ftp/ssh.

Make your home directory is 755, and see if that works (sometimes a permission problem stops users from logging in)

Make sure your user can execute /home, and /home/jim (chmod a+x /home && chmod a+x /home/jim)


Also, do you have a default shell picked for that user?

usermod -s /bin/bash jim


If not, they won't be able to log on.

Hope this helps!


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
Jim
post Jun 11 2004, 12:47 PM
Post #9


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



I have all the directory permissions set up, at least as far as I can tell. I tried the usermod command, that didn't help. Its got to be something wierd with the way Mandrake set it up, because this is the pre-configured FTP server. I don't know. Maybe its time to just ditch Mandrake.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Termina
post Jun 11 2004, 01:25 PM
Post #10


RMS is my Hero
******

Group: Support Specialist
Posts: 862
Joined: 18-February 04
From: Wisconsin
Member No.: 2,404



Or maybe.... you're just a witch. O_O


Seriously though, that's very strange. Did you add this user through some mandrake user adding thing, or did you just do the adduser command? Have you tried both, to see if one works over the other?

If not, then ditch proftpd and try out vsftpd (vsftpd.beasts.org is their website, I think). It's a nifty ftp server. =D

Also, I'm just curious, is there anything in your hosts.allow and hosts.deny file that has 'ftp' or 'proftpd' in it?


--------------------
*Points finger at the author above him* They're a witch! Burn them!
---
Vist my website!
Join me in IRC! Server: st0rage.org Channel: #UnhandledExceptions
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 11 2004, 01:36 PM
Post #11


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



I added the proftpd server to my mandrake 10 test machine ... by just doing the things that I posted.

Can you use ssh from another machine with the users you are trying to login with ... or login with them at boot screen?

Root can't login via proftpd ... but all other users should be able to.

What does:

netstat -an | grep LISTEN | grep 21

show?


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jun 12 2004, 12:15 PM
Post #12


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



I can't log in with any users right now, most importantly, the only user I really have on this system, me, the one that was created at install.

CODE
[jim@localhost jim]$ netstat -an |grep LISTEN | grep 21
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN
unix  2      [ ACC ]     STREAM     LISTENING     114937268 /home/jim/tmp/orbit-jim-a8e8c858/linc-6d4a-0-321cee2a960be
unix  2      [ ACC ]     STREAM     LISTENING     83347  /home/jim/tmp/orbit-jim-a8e8c858/linc-4921-0-45ec9ce6bbc0c
[jim@localhost jim]$


Both my hosts.allow and hosts.deny files are empty save the commented headers. I am changing from Mandrake 10 Comunity to 10 Official this afternoon, if that doesn't work my long friend Mandrake is getting the boot. I need to ditch all the auto crutches and really start doing stuff from scratch.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Jim
post Jun 13 2004, 10:54 PM
Post #13


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



So I finally got 10.0 Official installed, burned three coasters in the process, got some bad ISOs and X wouldn't install, kind of important, but besides the point.

Now when I try to load ftp through a browser is just hangs for ever, it does the same thing if I try to log in with a transfer program like gFTP. So ya, any thoughts on that?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Jim
post Jun 15 2004, 05:43 PM
Post #14


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Ok, so this is what the deel is now, it takes for ever to load (I am talking a couple mins pluss) but I finally get to a page if I try to load ftp://jim@12.218.15.47 from a browser. If I try to log in from something like gFTP it times out on me at 300 saying "421 No Transfer Timeout (300 seconds): closing control connection." even though I have the timeout set to 500.

Why would it be running so slow? I have a cable connection and my ssh and apache run really fast. There is also nothing there when the page finally comes up eventhough I have something in every folder I think it would come into (/home/jim, /var/ftp /var/ftp/pub) this is totally confusing me. Anythoughts?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 15 2004, 06:36 PM
Post #15


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



If there is a firewall, especially on both sides, you need to use passive FTP and set the firewall up for it.

First, get the FTP working correctly behind the firewall from another PC that is also behind the firewall (set up all your permissions and user info) ... then when that is done, set it up for passive mode...

NAT How-to

AND:

Active vs. Passive FTP


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jun 15 2004, 06:59 PM
Post #16


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Ok, first, Hughes, your link is bad, I will try to dig it up, but if you get this before I do, please post the right one.

Ok, so wile I work on this whole active passive thing, how to I set it up so that I can anyone just go to ftp://whatever and download from a specific public directory? Just that one, not all the rest of my stuff. Just a question, ok, back to the active passive thing.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jun 15 2004, 08:02 PM
Post #17


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



You can just put the files in a seperate directory on your website (with apache as the webserver) ... and go to that directory (like this:

http://www.hughesjr.com/wbel/

Don't put an index file in the directory and setup you apache config file (usually /etc/httpd/conf/httpd.conf) so that the directory in question has the Options Indexes set and people can download with no required FTP at all.

(in my case, my whole site, like this)

CODE
<VirtualHost *:80>
   ServerName www.hughesjr.com
   ServerAlias hughesjr.com
   DocumentRoot /var/www/hughesjr.com
   <Directory "/var/www/hughesjr.com">
     Options Indexes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
   </Directory>
     ErrorLog logs/hughesjr.com-error_log
     CustomLog logs/hughesjr.com-access_log combined
</VirtualHost>


----------------
For uploads, you can either use a content management system like Mambo (with docman) or phpnuke to allow uploads with no FTP ... or setup FTP.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 11:07 PM