Sunday, January 29, 2012

Jailing an FTP user

Jailing an FTP user

Solaris:


1. Login to the host and check the /etc/ftpd/ftpaccess file.

2. Add the below entry 

restricted-uid

3. This will restrict the ftp user to his home directory and deny navigation through other filesystems.


HP-UX


1. Files related to ftp server configuration

root@MyHPHost:/etc/ftpd# find / -name ftpaccess -print
/etc/ftpd/ftpaccess //this file is not available by default
/usr/newconfig/etc/ftpd/examples/ftpaccess

2. Create the ftpaccess file

cp -p /usr/newconfig/etc/ftpd/examples/ftpaccess /etc/ftpd/ftpaccess

3. Add the guest user entry to restrict user in their home directory

root@MyHPHost:/etc/ftpd# vi ftpaccess

// add this entry in the file to restrict user.

#KEYWORD LABEL USER HOSTS
class real,anonymous,guest *

# Any members of the ftp group will be chroot'd
#guestgroup ftpgrp
guestuser ftpuser1 ftpuser2

No comments:

Post a Comment