Thursday, October 20, 2011

Solaris 10: How to configure ftp with single user restricted access and other not allowed

/etc/ftpd/ftpaccess example
--------------
.
.
.
. omitted

# limit-time    anonymous       30
# limit         anonusers       10      Wk0730-1800       /etc/ftpd/toomany.msg
# limit         anonusers       50      SaSu|Any1800-0730 /etc/ftpd/toomany.msg
restricted-uid partsftp
allow-uid partsftp
deny-uid *
defumask 022
-----



ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 8
-rw-r--r--   1 partsftp partsftp     133 Oct 20 08:04 local.cshrc
-rw-r--r--   1 partsftp partsftp     157 Oct 20 08:04 local.login
-rw-r--r--   1 partsftp partsftp     172 Oct 20 08:04 local.profile
-rw-r--r--   1 partsftp partsftp     207 Oct 20 08:04 .profile
226 Transfer complete.
ftp> cd ..
550 Permission denied on server.  You are restricted to your account.
ftp> bye



-----------------
/var/adm/messages example

Oct 20 08:00:13 servername4 ftpd[24686]: [ID 177334 daemon.notice] FTP LOGIN REF  USED (username in denied-uid) FROM abc.com.se [172.17.200  .154], username