Help - Search - Members - Calendar
Full Version: Ftp And Mandrake....
Linuxhelp > Support > Technical Support
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?
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
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.


I don't know what else to do, I am still really confused.
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.
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?
The config file is:


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/ and then copy down the basic config like this:

mv /etc/proftpd.conf /etc/
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.
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.

# 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

# 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?
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!
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.
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 ( 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?
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

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.

[jim@localhost jim]$ netstat -an |grep LISTEN | grep 21
tcp        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.
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?
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@ 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?
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


Active vs. Passive FTP
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.
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:

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)

<VirtualHost *:80>
   DocumentRoot /var/www/
   <Directory "/var/www/">
     Options Indexes FollowSymLinks
     AllowOverride All
     Order allow,deny
     Allow from all
     ErrorLog logs/
     CustomLog logs/ combined

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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.