[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

re: wu-ftpd




Its very possible.  I have set it up on numerous occaisions for my company.  
Here is a howto.

-- Origional Message --
hey all, i'm setting up an ftp (wu-ftpd) server and i'm wondering if there is 
any way
to set the ftp users start dir? say i have a dir called /stuff, and i want 5
(or however many users) so when they login, their start dir is /stuff.. is
that possible to do? and if so, how?

thanks!!
-- 
@ugust

-- 
Arthur H. Johnson II
The Linux Box
http://www.linuxbox.nu
arthur@linuxbox.nu
Installing Web, Email, and FTP Servers

Apache:

1.Install all the apache RPMS from your distributions CD-ROM
2.Configuration files reside in /etc/httpd/conf
1.Modification is usually not necessary for simple web services.
3.Web home is usually /home/httpd
1.CGI-Scripts go in /home/httpd/cgi-bin
2.Web pages go in /home/httpd/html
4.Limiting web access to certain users
1.put this file in directory you want to limit access to as .htaccess
AuthUserFile /etc/httpd/conf/passwd
AuthGroupFile /dev/null
AuthName "AbMyr Squid Reports"
AuthType Basic
require valid-user 
2.create password file with "htpasswd -c /etc/httpd/conf/passwd username"
1.After initial creation, leave off -c


Sendmail:

1.Most servers come with common reasonable configurations.
2.Any configuration is done through /etc/sendmail.mc
1.Example:
include(/usr/lib/sendmail-cf/m4/cf.m4)
VERSIONID(`sendmail.mc - arthur@linuxbox.nu')
OSTYPE(linux)
define(`ALIAS_FILE',`/etc/mail/aliases')
MASQUERADE_AS(`usol.com')
FEATURE(masquerade_envelope)
FEATURE(genericstable, `hash -o /etc/mail/genericstable')
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')
define(`SMART_HOST',`mail.usol.com')
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
FEATURE(local_procmail)
FEATURE(`access_db')
MAILER(procmail)
MAILER(local)
MAILER(smtp)
2.Lines to note:
1.MASQUERADE_AS:  Is sometimes necessary to add this line to the configuration to tell sendmail what your hostname "really" is.  The newer sendmail has a ton of spam protections.  This is one.
2.Relaying.  Sendmail must be told what hosts can relay.
1.Worse comes to worse, you can turn sendmail completely non biased with this line in the MC file:  FEATURE(promiscuous_relay).  If your mail server is behind a firewall you can be assured this will do no harm.
2.If your configuration has an /etc/mail/access file, add your hosts to this file and run make from /etc/mail.  This will allow relaying.
3.To rebulid your Sendmail.mc file, run these commands:
1.m4 sendmail.mc > _sendmail.cf
2.mv -f _sendmail.cf sendmail.cf
3.Reload sendmail.  /etc/rc.d/init.d/sendmail restart
3.Further reading on Sendmail:
1.sendmail address rewriting mini-HOWTO from the Linux Doc Project
2.if your sendmail-doc rpm is installed:  /usr/doc/sendmail/README.cf
3.O'Reilly Sendmail book.  The difinative source.


Wu-FTPd

1.Normal FTP:  Install wu-ftpd and be happy.  Restart inetd.
2.For anonymous.  Install anonftp rpm.
3.For authenticated, but users denyed full access to file tree:
1.Create ftponly shell
	- add /bin/ftponly to /etc/shells
    	- Create /bin/ftponly with the following lines:
		#!/bin/bash
		echo "This account is for FTP access only"
		exit
    	- Make this file executeable:  chmod +x /bin/ftponly
2. Edit /etc/ftpaccess file
	- Disable anonftp in /etc/ftpaccess by changing the first line
	  which should read "class all real,guest,anonymous *" to
	  "class all real,guest *"
	- Enable users to delete files by changeing "delete no guest,anonymous"
	  to "delete yes all"
	- put guestuser * at the end of file
	- For real users on the system, put "realuser" followed by the
	  names of all the users allowed access outside the /home/ftp
	  tree.
	  	- ex. realuser brian joe richard
3. To add an FTP only user to the system:
	- Example:  adduser -M -s /bin/ftponly -d /home/ftp/./ username
		- "-M" means do not copy /etc/skel
			- Contains profile, desktop entries, etc.
			- Not needed for FTP users.
		- "-s /bin/ftponly" sets the shell
		- "-d /home/ftp/./" sets the initial direcory and root
			- the /./ signifies location of changed root
			- You may put a forced directory after /./
			- example:  You want all ford users to be
			  forced into /pub/ford, so you make the -d
			  /home/ftp/./pub/ford.
			- You may also make the root
			  /home/ftp/pub/ford/./ but you must copy the
			  bin, etc, and lib directories exactly as they
			  are into /home/ftp/pub/ford/ directory
	- Set the users password with "passwd username"
4. Create directories and adjust permissions to allow for read / write
access in FTP tree for users and groups using the FTP archive.
5. Edit /etc/hosts.allow to allow FTP connections
	- example: wu.ftpd: somehost : ALLOW
	- To allow for world access:  wu.ftpd: ALL : ALLOW

Reply to: