2012年4月11日星期三

AIX ftpaccess setup


Create puseronly for ftpaccess in AIX
1. create dev/null under target folder
   /share/ftp/autovue/upl

according to /usr/samples/tcpip/anon.ftp

# make $FTPHOME dev/null entry
mkdir dev
#do equiv of mknod dev/null c 2 2
/usr/sbin/mknod dev/null c $(ls -l /dev/null | awk '{print $5, $6}' | tr -d ,)
chmod 555 dev
chown root dev
chgrp system dev

2. Add right permission for group and others to dev/null

3. Add the following line in /etc/ftpaccess.ctl
################################################################################
# FTP Access Control -> Take Effect Immediately -> No Need to Restart Subsystem
################################################################################
#
# Read Only Folders -> No matter what the folder right is
# writeonly : disable get command to specific folders
# readonly : disable put/delete command to specific folders
# readwrite: allow any action
# These setting apply to all users include root
# e.g.
# writeonly: /share/prd/writeonly
# readonly: /share/prd/readeonly
# readwrite: /share/prd/readwrite
#
# Anonymous Login
# with "p" = Need User Password
# Normally Nth show to user but can upload files,
# but ls command can show files
# Symbolic Link Not Work For Both "useronly" and "puseronly"
# This will override the above setting i.e. overwrite readonly setting
# e.g.
# puseronly: targetuser
# pgrouponly: targetgrp
puseronly: auvueupl,auvuednl,autovue

4. Add restrict user list to /etc/ftpusers
Please add according to your /etc/passwd

Examples :
########################################################################
# The following users will be restricted from ftp login
########################################################################
root
daemon
bin
sys
adm
uucp
guest
nobody
lpd
lp
invscout
snapp
ipsec
nuucp
esaadmin
#targetusr
#targetadm
#targetsys
########################################################################
# Allow Users List
########################################################################
#auvueupl
#auvuednl
#autovue

沒有留言: