Click to See Complete Forum and Search --> : Urgent help needed in wu-ftp
m3rlin
10-25-2001, 07:56 AM
hi! I realy need urgent help on this serviçe, okey, im using suse 6.3 and the version o mi wu-ftp is 2.6 or something. I installed but i did something that i think i shouldn't do it since i couln't configure the serviçe i deleted the ftp in /usr/local/ftp, i run yast and installed the program again but he didn't make any new dir. How do i resolv this problem, since the program can NOT create the directory, and how do i add ftp users, i mean, i wannt to make an ftp public service but with no anonymous, i wannt a username and a password as a requierment, and how do i give access to 1 directory, i wannt to restrict the access to all folders of the system, only access to forlder "pub" for example. Sorry about this mess of question, but you as an expert should understand what im a tring to say. Thanks a lot for you help, and i accept securitys advices as well, or other ftp servers, grafical it should be more easy to configure, but is it more secure?
Once again, Thanks!
X_console
10-25-2001, 01:42 PM
First, I'd recommend uninstalling wu_ftpd and replaceing it with proftpd: http://www.proftpd.org/ It's much more secure.
Once you've done that, to add users, you need to create a user entry on your system. Use adduser or useradd or whatever your distro uses to add a new user to the system. Let's say you add user foobar. Once that's done, change foobar's shell to /bin/false:
chsh -s /bin/false foobar
This will prevent them from logging into the server through telnet or ssh. Next add the following entry in /etc/shells:
/bin/false
Now create an FTP directory:
mkdir -p /home/ftp
Edit /etc/proftpd and add the following entry:
DefaultRoot /home/ftp
This will ensure that when they log in, they can't get to your /etc or / directory. Finally, add the following to inetd.conf:
ftp stream tcp nowait root /usr/sbin/tcpd proftpd
Now you can run it:
kill -HUP $(cat /var/run/inetd.pid)
Done.
m3rlin
10-25-2001, 05:03 PM
Hum! I see if i add a user in the console he will not have a shell, but for him to login he must have a shell, so i create a shell that does no existe (false for example). Enginous :)! Thanks i will do that and replace the ftp server as you adviced. Tell me something do you know a god firewall, no to complicated to configure. I once used ipchains, but it was kind of complex and i didn't found many examples on the internet.
If you could i advice 1 or it could be ipchains, but please tell me where do i get good examples of configuration.
Thanks
X_console
10-25-2001, 06:59 PM
ipchains and iptables come with Linux. If you're using kernel 2.4.x, then you've probably got iptables installed. Instead of manually configuring these, you can download a front end which will do it for you based on easy to answer questions. I personally like gShield because you just have to answer YES or NO to the config file and it sets up the firewalling rules for you. If you want to add custom rules, you can do that as well. You can get it here: http://muse.linuxmafia.org
Current version is for iptables only. If you're using 2.2.x kernel with ipchains, you need to download one of the older versions that uses ipchains.
m3rlin
10-25-2001, 07:15 PM
Im having some problems with the proftp, i did a user put his shell as /bin/false he login everthing smood, e can not change the directory, so far so good, but if anyone tries to do upload e returns an error like this "stor <file that i try to upload>
550 <file> permission denied
stor command failed. I think that he as the proper permissions. Whats the permissions that i must give, but i don't wannt to give permission to execute, just read and write, this is a ftp for downloads and uploads
Thanks for your help