Change user ownership of s3fs mounted buckets

自古美人都是妖i 提交于 2019-12-08 18:03:48

问题


how can I modify the user:group ownership of a s3fs mounted bucket?

I have a git installation that I would essentially like to store on my Amazon S3 account in a bucket, and then using Sparkleshare, via my web host, sync this data accross multiple machines.

- I Have set up the sparkleshare to successfully sync three machines. Works like a charm.

  • This is syncing to a folder at /home/git/dropbox No problems there.
  • I want the sync folder to me a mounted S3 bucket though
  • I can mount the buckets right next to that dropbox folder, but no love changing ownership to git:git

Problem: when you create the mount with root:root user, only that user has access to the bucket.

I tried to create the mount with S3FS logged in as the GIT user, but no luck, it still mounts and assigns permissions as the root:root user.

Do I uninstall S3FS and re-install using the GIT user?

Any help would be greatly appreciated!

Rick


回答1:


On Ubuntu I am finding that whichever user does the s3fs mount will own it, even though ls will show the owner as root:root, and in fact root cannot use it. When you did the mount as the git user are you sure you could not write to it?




回答2:


You simply want to mount it as that user. You can also automount it by adding the uid and gid that you want it mounted as. For example, your /etc/fstab would have an entry such as the following:

s3fs#s3bucketName  /mnt/point     fuse    defaults,noatime,allow_other,uid=500,gid=48,use_cache=/tmp,default_acl=public-read 0 0



回答3:


1.69 seems to have fixed a uid/gid issue https://code.google.com/p/s3fs/downloads/detail?name=s3fs-1.69.tar.gz&can=2&q=



来源:https://stackoverflow.com/questions/9764401/change-user-ownership-of-s3fs-mounted-buckets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!