Thursday, February 14, 2008

Configure Wuftp in Solaris 8 with Restricted home directory

By defualt ftp service in soalris 8 dosnt have option to restrict ftp users to thier home directory
By installing wuftpd service we can enable this option.I have used wuftpd solaris package from sunfreeware.com

Download wuftpd from www.sunfreeware.com

wuftpd-2.6.2-sol8-sparc-local.gz
upload package to server /tmp directory

Install package

cd /tmp
gunzip wuftpd-2.6.2-sol8-sparc-local.gz

pkgadd -d wuftpd-2.6.2-sol8-sparc-local


edit /etc/inetd.conf

Comment following line in /etc/inetd.conf
#ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd -a

Add following line .(Make sure not mentioning tcp6)

ftp stream tcp nowait root /usr/local/sbin/in.ftpd in.ftpd -al


copy sample configuration files

#cd /usr/local/doc/wuftpd/doc/examples/
#cp ftpaccess /etc
#cp ftpconversions.solaris /etc/ftpconversions

*if /etc/ftpusers doent exist on your system copy that file also
#cp ftusers /etc

Restrict users only to their home directories

Add following lines to /etc/ftpaccess
restricted-uid *

Restart inetd
pkill -HUP inetd

Wuftpd gives lots of configuration option . /etc/ftpaccess can be configured to restrict users and in many ways .
here is a good link for configure logging with wuftpd
http://www.landfield.com/wu-ftpd/logging.html