chrootを使用してフォルダを所有しているルートなしでSFTPアクセスをロックします。

chrootを使用してフォルダを所有しているルートなしでSFTPアクセスをロックします。

chroot私が読んだすべてのコンテンツには、フォルダを使用するにはsftp rootそのフォルダが必要です。私はユーザーがsftp自分のホームフォルダ内のサブディレクトリにのみアクセスできることを願っています/home/user/some/folder

ベストアンサー1

man 8 sftp-server、望むより:

-d start_directory
         specifies an alternate starting directory for users.  The
         pathname may contain the following tokens that are expanded at
         runtime: %% is replaced by a literal '%', %d is replaced by the
         home directory of the user being authenticated, and %u is
         replaced by the username of that user.  The default is to use the
         user's home directory.  This option is useful in conjunction with
         the sshd_config(5) ChrootDirectory option.

おすすめ記事