S3fs-fuse: Permission denied to read files uploaded via S3 webinterface/console

Created on 12 Jan 2017  路  3Comments  路  Source: s3fs-fuse/s3fs-fuse

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 0

  • s3fs 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.txt
d--------- 1 root root 0 Jan 11 14:21 newtest
drwxrwxr-x 1 root root 0 Jan 9 10:36 test1
drwxrwxr-x 1 ftpuser ftpuser 0 Jan 11 13:59 test2
-rw-rw-r-- 1 ec2-user ec2-user 6 Jan 11 14:30 test2.txt

The 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.png
tail: cannot open '/mnt/s3bucket/3.png' for reading: Permission denied

As 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.

Most helpful comment

In case someone on Mac having this issue, I managed to be able to read folders and files with the below command:

s3fs BUCKET_NAME /path/to/mount/ -o passwd_file=/path/to/credentials,allow_other,uid=`id -u`,umask=0077,mp_umask=0077,use_cache=/path/to/cache/ -d -d -f

All 3 comments

@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.

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 username
The /etc/fstab entry looks like this:
s3fs#mybucket /mnt/s3bucket fuse _netdev,rw,nosuid,nodev,allow_other,uid=XX 0 0

In case someone on Mac having this issue, I managed to be able to read folders and files with the below command:

s3fs BUCKET_NAME /path/to/mount/ -o passwd_file=/path/to/credentials,allow_other,uid=`id -u`,umask=0077,mp_umask=0077,use_cache=/path/to/cache/ -d -d -f
Was this page helpful?
0 / 5 - 0 ratings

Related issues

bubba-h57 picture bubba-h57  路  3Comments

chrisgo picture chrisgo  路  5Comments

neilmillard picture neilmillard  路  3Comments

mayying picture mayying  路  9Comments

JamesB7 picture JamesB7  路  3Comments