[GH-ISSUE #525] Readonly / FSTAB Question #294

Closed
opened 2026-03-04 01:44:07 +03:00 by kerem · 4 comments
Owner

Originally created by @bjay1404 on GitHub (Jan 24, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/525

Hi, this is not an issue.

The software works great!

I'm trying to figure out how to mount a bucket as read only. I've noticed that the permissions change when I mount the folder - so chmod is obviously out. How can I mount a bucket as read only without modifying IAM credentials? Also, how can I specify an iam role / read only in fstab?

Thanks!

Originally created by @bjay1404 on GitHub (Jan 24, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/525 Hi, this is not an issue. The software works great! I'm trying to figure out how to mount a bucket as read only. I've noticed that the permissions change when I mount the folder - so chmod is obviously out. How can I mount a bucket as read only without modifying IAM credentials? Also, how can I specify an iam role / read only in fstab? Thanks!
kerem 2026-03-04 01:44:07 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@hayd commented on GitHub (Feb 17, 2017):

Surprising that write is required even for ls (of subdirectories).

Are there some specific objects that could be writable which would allow "mostly readonly"?

<!-- gh-comment-id:280761781 --> @hayd commented on GitHub (Feb 17, 2017): Surprising that write is required even for ls (of subdirectories). Are there some specific objects that could be writable which would allow "mostly readonly"?
Author
Owner

@ggtakec commented on GitHub (Mar 19, 2017):

@bjay1404
To restrict writing to a file, you can use umask (mp_umask).
And to restrict the change of file permissions, the execution status flag(x) must not be set the current directory.
These are the same as the file system.
If you want to adapt the restrictions to all files under the bucket, you can use the umask(mp_umask) option.
If you want to use iam role, you can use iam_role option.

(if you need more information or my fault, please reopen this issue.)
Regards,

<!-- gh-comment-id:287635352 --> @ggtakec commented on GitHub (Mar 19, 2017): @bjay1404 To restrict writing to a file, you can use umask (mp_umask). And to restrict the change of file permissions, the execution status flag(x) must not be set the current directory. These are the same as the file system. If you want to adapt the restrictions to all files under the bucket, you can use the umask(mp_umask) option. If you want to use iam role, you can use iam_role option. (if you need more information or my fault, please reopen this issue.) Regards,
Author
Owner

@hayd commented on GitHub (Mar 19, 2017):

@ggtakec The question is should s3fs be able to mount and read files if (either the role or api keys - I don't think that aspect is relevant) have readonly permissions to the s3 bucket?

When I tried (with readonly bucket permission) I was unable to mount. Is that expected?

Edit: SOLVED BY https://github.com/s3fs-fuse/s3fs-fuse/issues/189#issuecomment-112089764 (allow other and 0002):

s3fs -o allow_other -o umask=0002 [bucket-name] [mount-folder]
OR
s3fs -o iam_role=auto -d -o allow_other -o umask=0002 [bucket-name] [mount-folder]
<!-- gh-comment-id:287637079 --> @hayd commented on GitHub (Mar 19, 2017): @ggtakec The question is should s3fs be able to mount and read files if (either the role or api keys - I don't think that aspect is relevant) have readonly permissions to the s3 bucket? When I tried (with readonly bucket permission) I was unable to mount. Is that expected? Edit: SOLVED BY https://github.com/s3fs-fuse/s3fs-fuse/issues/189#issuecomment-112089764 (allow other and 0002): ``` s3fs -o allow_other -o umask=0002 [bucket-name] [mount-folder] OR s3fs -o iam_role=auto -d -o allow_other -o umask=0002 [bucket-name] [mount-folder] ```
Author
Owner

@ggtakec commented on GitHub (Mar 19, 2017):

@hayd
I tried to access read only bucket which is mounted by s3fs(normal options).
It works(read the object under bucket, and could not write it, could not change permission) good for me.
example my s3fs line)
s3fs /mnt/s3 -o allow_other,url=https://s3.amazonaws.com

Regards,

<!-- gh-comment-id:287639359 --> @ggtakec commented on GitHub (Mar 19, 2017): @hayd I tried to access read only bucket which is mounted by s3fs(normal options). It works(read the object under bucket, and could not write it, could not change permission) good for me. example my s3fs line) s3fs <my read only bucket> /mnt/s3 -o allow_other,url=https://s3.amazonaws.com Regards,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#294
No description provided.