Monday, November 22, 2010

Restrict FTP User to a Directory in Solaris

I am using Solaris 10 on SPARC.

SunOS ddw 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise

I have put some text files in a directory '/u01/network'

I want to create a ftp user which can just read the files in the network directory. The ftp user shouldn't be able to navigate or see any other directory outside of the network directory.

The user ftp_usr is the owner of /u01/network directory.

Following are settings in /etc/passwd:


The settings in the /etc/ftpd/ftpaccess:

allow-retrieve relative class=realusers /u01/network

restricted-uid ftp_user

Also set the permissions on the /u01 directory as 755.

And you are all set to go.

No comments: