从 rssh 迁移到 rush……
我不明白这是什么意思not an absolute directory name
。请参见下面的日志:
Aug 31 14:07:24 secmgrprd04 systemd: pam_unix(systemd-user:session): session opened for user upload by (uid=0)
Aug 31 14:07:24 secmgrprd04 rush[3904968]: debug level set to 3
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:5:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:6: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:7: # Default settings
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:8: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:9:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:10: rule default
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:11: acct on
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:12: limits t10r20
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:13: umask 002
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:14: env - USER LOGNAME HOME PATH
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:15: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:16: # Uncomment this to activate the notification subsystem:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:17: # (Also install 'rush-notifier' or a similar script.)
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:18: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:19: #post-socket inet://localhost
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:20: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:21: fall-through
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:22:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:23: ######################
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:24: # File moving services
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:25: ######################
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:26:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:27: # Scp requests: only putting, no fetching.
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:28: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:29: # The server host needs the paths
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:30: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:31: # /srv/rush/srv/incoming/{alpha,ftp}
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:32: #
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:33: # and that they be writable! A specific
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:34: # group can be assigned to all users
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:35: # expected to gain access via GNU rush.
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:36:
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:37: rule scp-to
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:38: command ^scp (-v )?-t( --)?
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:39: set[0] /usr/bin/scp
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:40: chroot "/data/upload"
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:40: not an absolute directory name
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:41: chdir "/"
Aug 31 14:07:24 secmgrprd04 rush[3904968]: /etc/rush.rc:41: not an absolute directory name
Aug 31 14:07:24 secmgrprd04 rush[3904968]: Finished parsing /etc/rush.rc
Aug 31 14:07:24 secmgrprd04 rush[3904968]: errors parsing config file
我实际上是从文档中复制了示例chroot "~"
并将其更改为绝对路径,但仍然出现相同的错误。
Ubuntu 20.04,通过 apt 安装,版本:1.8+dfsg-1.1
困惑!
答案1
来自文档:
chroot <DIR>
Change the root directory to DIR. This directory will be used for file names
beginning with /. A tilde at the start of DIR is replaced with the user's home
directory.
chdir <DIR>
Change to the directory DIR. The argument is subject to tilde-expansion as in
chroot, above. If both chdir and chroot are specified, then chroot is executed
first.
现在我猜要么是目录不存在,要么是缺少权限。要检查哪个参数导致问题,请debug 3
在配置中添加行。