Contents
theseus# portinstall shells/scponly
すると、エラーでとまる。もう一度
theseus# portinstall shells/scponly
でもとまる。でしつこく、
theseus# portinstall shells/scponly
すると、
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 295 packages found (-0 +1) . done] theseus# portinstall shells/scponly ** Found already installed package(s) of 'shells/scponly': scponly-4.8
とインストール出来た。が、なんとなく、バギーな予感・・・
cd /usr/local/share/examples/scponly/ piano:root {227} % ./setup_chroot.sh Next we need to set the home directory for this scponly user. please note that the user's home directory MUST NOT be writeable by the scponly user. this is important so that the scponly user cannot subvert the .ssh configuration parameters. for this reason, a writeable subdirectory will be created that the scponly user can write into. -en Username to install [scponly] -en home directory you wish to set for this user [/home/scponly] -en name of the writeable subdirectory [incoming] creating /home/scponly/incoming directory for uploading files Your platform (FreeBSD) does not have a platform specific setup script. This install script will attempt a best guess. If you perform customizations, please consider sending me your changes. Look to the templates in build_extras/arch. - joe at sublimation dot org please set the password for scponly: Changing local password for scponly New Password: Retype New Password: if you experience a warning with winscp regarding groups, please install the provided hacked out fake groups program into your chroot, like so: cp groups /home/scponly/bin/groups piano:root {102} %
WinSCP Ver3*では、
セッションは予期せずに閉じられました サーバはコマンドの戻り値 0 を出力しました
WinSCP Ver4*では、
セッションは予期せずに閉じられました サーバはコマンドの戻り値 128 を出力しました
と言って認証後接続が切れる。これは、OpenSSHが $CVSCHROOT/dev/null を要求する仕様になったためとのこと。
[FreeBSD-users-jp 89461] $CVSCHROOT = /usr/home/scponly というユーザのホーム # mkdir -p $CVSCHROOT/dev # mount -t devfs devfs $CVSCHROOT/dev
したところ正常に動作するようになりました。 ただ null 以外の必要のないものまでマウントされてしまいますし 起動時に毎回 mount_devfs しなければならなりませんが・・・
起動時にスクリプトをかけばよいのかしらん???
#!/bin/sh /sbin/mount -t devfs devfs /usr/home/scponly/dev
/usr/local/etc/rc.d/winscp_dev_null_mount と言うスクリプトファイルを置いてrebootするが、自動マウントされなかったが、ファイル名に「.sh」をつけたらOKでした。でも、なんか、嘘くさい・・・
winscp_dev_null_mount.sh
http://wiki.fdiary.net/BSDmad/?scponly/
http://blog.livedoor.jp/tuzzy92/archives/cat_1423758.html