LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Chroot and sftp on Solaris 10 (https://www.linuxquestions.org/questions/solaris-opensolaris-20/chroot-and-sftp-on-solaris-10-a-654944/)

omlex 07-10-2008 04:13 PM

Chroot and sftp on Solaris 10
 
Hi Guys,

Anyone have tried to implement chroot and sftp on Solaris 10? If so, kindly tell how. thanks.

custangro 07-10-2008 04:49 PM

This is not a how-to; it assumes you need only clues.

* Become root
* Create the structure necessary to host chrooted FTP:
ftpconfig -d /some/dir/name (being aware it will add /bin, /usr, /etc, and /pub to your specified directory, especially note it creats /pub!!!)
* vi /etc/group
add ftponly::21:
* vi /etc/shells
add /bin/true
* vi /etc/passwd
add ftp2:x:400:21:FTP user:/some/dir/name/./pub:/bin/true
* vi /etc/ftpd/ftpaccess
Insert these options
> guestgroup ftponly
> log commands real,guest,anonymous
> log security real,guest,anonymous
> log transfers real,guest,anonymous inbound,outbound
> upload /some/dir/name/pub * no
> upload /some/dir/name/pub /pub yes ftp2 ftponly 0666 nodirs
> upload /some/dir/name/pub /pub yes ftp2 ftponly 0666 nodirs
* passwd ftp2
* svcadm enable ftp

jamesapnic 07-15-2008 09:48 PM

I think he wanted sftp not normal ftp.

http://chrootssh.sourceforge.net/download/

this should work on solaris.


All times are GMT -5. The time now is 02:29 PM.