限制用户访问 S3 支持的 SFTP 服务器

Restricting user access on SFTP server backed by S3

我正在尝试创建一个由 S3 支持的 SFTP 服务器。我已经成功安装了 vsftpds3fs,链接了它们,一切正常。

要求:

  1. 一个FTP服务器将有多个用户,每个用户将有不同的s3桶链接到他们的ftp文件夹。 [完成]

    Approach : Created two different users (say user1 & user2), and mounted buckets to their home directory.

  2. 一个用户不能查看其他用户的文件夹和文件。

    Approach : Since I created two different users, I thought the access will be restricted. But looks like when I mount a bucket using s3fs it changes access of the folder to 777.

现在的问题是,我无法限制我的用户访问其他用户的文件。 我的 /etc/vsftpd.conf 看起来像这样:-

ftpd_banner=Welcome to Dave's FTP service.

# Now restrict users to their home directories:
chroot_local_user=YES
allow_writeable_chroot=YES

我已经看到并尝试过类似 this, this and this 的问题。这些都没有帮助,所以请在将其标记为重复之前再考虑一下

您需要在用户目录中创建挂载目录,如/home/user1/mountToS3,然后使用chmodchown 限制该目录。应该这样做。如果您发现任何问题,请告诉我。 :)