我想将s3fs挂载到AWS S3存储桶,使用encfs加密S3存储桶中的内容并写入存储桶(例如将文件复制到存储桶)作为ec2-user(即不使用须藤)。我不能复制文件作为ec2用户,我必须使用sudo,但这是不可取的。谁能告诉我们需要做什么才能让我在不使用sudo的情况下离开?
已发出以下命令:
# Create mount points
$ sudo mkdir /mnt/encfs
$ sudo mkdir /mnt/s3fs
# Mount s3fs
$ sudo s3fs mybucket /mnt/s3fs -o use_cache=/tmp,allow_other
# Mount encfs. Option 'p' is used (for pre-configured paranoia mode)
$ sudo encfs /mnt/s3fs /mnt/encfs/
$ sudo chown ec2-user:ec2-user /mnt/encfs
# Create a link from ec2-user home directory
$ ln -s /mnt/encfs encrypted_folder
目前情况:
$ sudo cp plaintext.dat encrypted_folder <- this works
$ cp plaintext.dat encrypted_folder <- this does NOT work
cp: accessing 'encrypted_folder': Permission denied
任何人都可以指出我在这里做错了什么吗?我需要做些什么来使它工作,所以我必须使用sudo?谢谢!
答案 0 :(得分:3)
只是提供更新。解决安装encfs时的权限问题包括switch --public。那应该解决它。