Solaris/Solaris FTP Server Setup

The FTP on Solaris is not set up by default. To set it up, do the following:

1. Login as root

2. Create a new user "ftp" in /etc/passwd file as follows:

ftp:x:123:1:Anonymous FTP:/export/home/ftp:/bin/true

3. Then we need to sync this file with /etc/shadow with:

pwconv

4. Create a directory for this ftp account like this:

mkdir /export/home/ftp

Change the ownership on this directory to:

chown -R root:other /export/home/ftp

5. Set permissions on just created directory with 555 permission:

chmod 555 /export/home/ftp

6. Create directory pub where the files will be uploaded and downloaded from:

mkdir /export/home/ftp/pub

7. Change permissions on this pub directory to:

chmod 777 /export/home/ftp/pub

8. Modify /etc/ftpd/ftpaccess file by adding the following line:

upload /export/home/ftp /pub yes ftp other 0600 nodirs

9. Now start the ftp server. You will need to su, pfexec, or however you have Solaris setup to run this command

inetadm -e ftp

10. Test to see if the ftp server is running

inetadm | grep ftp

The FTP server should allow the connection and upload/download of files now by anonymous user

When anonymous user logs in, the login should be anonymous and the password is the email address. After logging in, the user should go to pub directory by invoking:

cd pub

Then the user can add a file from his current directory by doing:

put “filename” - where “filename” is the name of the file to be uploaded to the server

In order to get a file user should do:

get “filename”
Last modified on 27 December 2012, at 12:59