我怎样才能装入S3量使用FUSE适当的权限适当、权限、FUSE

2023-09-11 09:26:40 作者:梦已慌i

我有一个Amazon S3存储(姑且称之为static.example.com),我需要在一个EC2实例(Ubuntu的12.04.2)安装。我已经安装了s3fs。我能够安装卷,但我不能写桶。我曾尝试:

I have an Amazon S3 bucket (let's call it static.example.com) that I need to mount on an EC2 instance (Ubuntu 12.04.2). I've installed s3fs. I'm able to mount the volume, but I can't write to the bucket. I have tried:

sudo s3fs static.example.com -o use_cache=/tmp,allow_other,uid=33,gid=33 /mnt/static.example.com

我可以再 CD的/ mnt LS -la 来看看:

drwxr-xr-x  5 root     root      4096 Mar 28 18:03 .
drwxr-xr-x 25 root     root      4096 Feb 19 19:22 ..
lrwxrwxrwx  1 root     root         7 Feb 21 19:19 httpd -> /httpd/
drwx------  2 root     root     16384 Oct  9  2012 lost+found
drwxr-xr-x  1 www-data www-data     0 Jan  1  1970 static.example.com

这一切看起来不错,但是当我 CD static.example.com 的mkdir测试,我得到:

This all looks good, but when I cd static.example.com and mkdir test, I get:

mkdir: cannot create directory `test': Permission denied

其实我可以创建一个目录或触摸一个文件的唯一方法是用须藤强迫它。这是不是一种可行的选择,但是因为我想将文件写入来自Apache桶。我的Apache服务器用户运行:WWW组数据。运行安装收益率:

The only way I can actually create a directory or touch a file is to force it with sudo. This is not a viable option, however, because I want to write files to the bucket from Apache. My Apache server runs as user:group www-data. Running mount yields:

s3fs on /mnt/static.example.com type fuse.s3fs (rw,nosuid,nodev,allow_other)

我怎样才能装入此斗的方式,让我写桶?

How can I mount this bucket in a manner that will allow me to write to the bucket?

推荐答案

我的开源项目的主要开发者和维护者的 RioFS 的:一个用户空间文件系统挂载Amazon S3的桶

I'm the lead developer and maintainer of Open source project RioFS: a userspace filesystem to mount Amazon S3 buckets.

我们的项目是一个替代s3fs项目,主要优点比较s3fs是:简洁,操作和错误无code的速度。目前 处于试用状态,但它在几个高负载文件服务器已经运行了相当的项目一段时间。

Our project is an alternative to "s3fs" project, main advantages comparing to "s3fs" are: simplicity, the speed of operations and bugs-free code. Currently the project is in the "beta" state, but it's been running on several high-loaded fileservers for quite some time.

我们正在寻求更多的人加入我们的项目,并与测试提供帮助。从我们方面,我们提供快速的bug修复,并会听你的要求增加新的功能。

We are seeking for more people to join our project and help with the testing. From our side we offer quick bugs fix and will listen to your requests to add new features.

关于您的问题:

if'd您使用 RioFS ,你可以安装一个桶,并有写入权限使用下面的命令(假设你已经安装了 RioFS 并已出口AWSACCESSKEYID和AWSSECRETACCESSKEY环境变量):

if'd you use RioFS, you could mount a bucket and have a write access to it using the following command (assuming you have installed RioFS and have exported AWSACCESSKEYID and AWSSECRETACCESSKEY environment variables):

riofs  -o allow_other http://s3.amazonaws.com bucket_name /mnt/static.example.com

(请参见项目描述为命令行参数)

(please refer to project description for command line arguments)

请注意,该项目尚处于开发中,有可能仍然是一些错误离开了。

Please note that the project is still in the development, there are could be still a number of bugs left.

如果您发现按预期的东西不起作用:请填写上的项目的GitHub的页面。

If you find that something doesn't work as expected: please fill a issue report on the project's GitHub page.

希望它能帮助,我们期待着您加入我们的社会!

Hope it helps and we are looking forward to seeing you joined our community !