Enable anonymous ftp on Solaris 10


Here the simple step to enable anonymous ftp on Solaris 10:

# ftpconfig -d /export/home/ftp_anonymous
Creating directory /export/home/ftp_anonymous
Updating directory /export/home/ftp_anonymous

# ls /export/home/ftp_anonymous
bin  dev  etc  lib  pub  usr

# ftpconfig /export/home/ftp_anonymous
Creating user ftp
Updating directory /export/home/ftp_anonymous

# svcadm enable svc:/network/ftp:default

# svcs -a | grep ftp
online         18:30:19 svc:/network/ftp:default

Testing from client side:

$ ftp
Connected to (
220 solaris FTP server ready.
Name ( anonymous
331 Guest login ok, send your complete e-mail address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
227 Entering Passive Mode (192,168,56,10,251,189)
150 Opening ASCII mode data connection for /bin/ls.
total 16
lrwxrwxrwx   1 root     bin            9 Oct 19 18:29 bin -> ./usr/bin
d--x--x--x   2 root     sys            7 Oct 19 18:29 dev
d--x--x--x   5 root     sys            8 Oct 19 18:29 etc
d--x--x--x   2 root     bin           23 Oct 19 18:29 lib
drwxr-xr-x   2 root     sys            2 Oct 19 18:24 pub
d--x--x--x   6 root     sys            6 Oct 19 18:24 usr
226 Transfer complete.
ftp> bye
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 780 bytes in 1 transfers.
221-Thank you for using the FTP service on solaris.
221 Goodbye.

One thought on “Enable anonymous ftp on Solaris 10

  1. Hi Rachmat Febrianto,

    I need a small input from you. This is quite URGENT as one our PROD SOLARIS10 zone ftp setup is disturbed and users are able to see all sub-folder under / along with ftpuser’s home-dir path which they do not want.

    It is a chrooted setup.
    [root@server:/etc/ftpd 108]# cat ftpaccess | grep upload
    upload class=anonusers * * no nodirs

    [root@server:/etc/ftpd 104]# cat /etc/passwd|grep galleno
    galleno:x:35632:1011:Oran Gallen,652138 (HSP):/content/./:/export/home/was6orl/cps/bin/cps.pl
    gallenor:x:35632:1014:Oran Gallen,652138 (HRW):/content/./:/export/home/was6orl/cps/bin/cps.pl

    [root@server:/etc/ftpd 105]# ls -ld /content/./
    drwxrwxrwx 55 root hspusers 14336 Apr 14 03:05 /content/./

    Both user using using FileZill client/WinSCP to transfer file. However during transfer they are not seeing / in Remote Site window. He is able to see all folder under / along with /content and its folder.

    ftp> pwd
    257 “/” is current directory is not coming in Remote site
    Note that now current directory listing is coming as / along with sub-folder along with /content/ and its data..

    I hope this needs to be setup as chrooted which was working fine previously till 2 week back.

    I have taken backup of /etc/passwd /etc/shadow /etc/group and

    Just want your inputs if I run ftpconfig –d /content to update the chrooted environment , will it affect existing data under /content or not ?

    The ftpconfig script is executed by the super user to set up
    anonymous FTP. Anonymous FTP allows users to remotely log on
    to the FTP server by specifying the user name ftp or
    anonymous and the user’s email address as password. The
    anonymous users are logged on to the FTP Server and given
    access to a restricted file area with its own file system
    root. See chroot(2). The FTP area has its own minimal sys-
    tem files.

    -d Create a new or update an existing ftpdir without
    creating or updating the ftp user account. Use this
    option when creating guest FTP user accounts.

    The following operands are supported:

    ftpdir The absolute pathname of the directory under which
    the anonymous FTP area is set up.

    Thanks in advance…!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s