mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #519] Permission denied to read files uploaded via S3 webinterface/console #290
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Timboo89 on GitHub (Jan 12, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/519
Additional Information
The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Version of s3fs being used (s3fs --version)
_example: 1.80
Version of fuse being used (pkg-config --modversion fuse)
_example: 2.9.4
System information (uname -a)
_command result: #1 SMP Mon Jan 9 23:00:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Distro (cat /etc/issue)
_command result:
Amazon Linux AMI release 2016.09
Kernel \r on an \m
s3fs command line used (if applicable)
/etc/fstab entry (if applicable):
s3fs#mybucket /mnt/s3bucket fuse _netdev,rw,nosuid,nodev,allow_other 0 0s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
Details about issue
I mounted my s3bucket as via /etc/fstab.
What's working:
Writing files to bucket as any user on EC2 instance.
Reading files from bucket, that the EC2 user created himself.
Reading ALL files (and folders) as su of EC2 instance.
What's not working:
Reading files as normal user of EC2 instance, that he didn't create / were created via the S3 webinterface / console.
ls -al /mnt/s3bucket-rw-rw-r-- 1 root root 259216 Jan 11 13:57 3.png-rw-rw-r-- 1 root root 12 Jan 11 13:57 hello.txtd--------- 1 root root 0 Jan 11 14:21 newtestdrwxrwxr-x 1 root root 0 Jan 9 10:36 test1drwxrwxr-x 1 ftpuser ftpuser 0 Jan 11 13:59 test2-rw-rw-r-- 1 ec2-user ec2-user 6 Jan 11 14:30 test2.txtThe files 3.png and hello.txt as well as the folder newest were created via the s3 webinterface. The rest is created directly via ssh. If I want wo read any of those 3 files I get this message:
tail /mnt/s3bucket/3.pngtail: cannot open '/mnt/s3bucket/3.png' for reading: Permission deniedAs su thats not a problem. How can I fix it, so that every/another user of my EC2 instance can read those files?
Thanks a lot.
@ggtakec commented on GitHub (Jan 15, 2017):
@Timboo89
I think that similar problems have not occurred at s3fs so far.
So 3.png file is allowed read access for other users but you can not read it, we should know permission for mount point directory.
Other than that, you can try to use uid/gid/umask/mp_umask option for s3fs.
Thanks in advance for your assistance.
@Timboo89 commented on GitHub (Jan 17, 2017):
Thanks a lot =)
This is working well!
For everyone who does not know how to get the uid of a user, hit the following in your shell:
id -u usernameThe /etc/fstab entry looks like this:
s3fs#mybucket /mnt/s3bucket fuse _netdev,rw,nosuid,nodev,allow_other,uid=XX 0 0@javilumbrales commented on GitHub (Nov 16, 2017):
In case someone on Mac having this issue, I managed to be able to read folders and files with the below command: