mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #673] Mounting is successful, but get permission denied #380
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#380
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 @avnerbarr on GitHub (Nov 15, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/673
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.
1.82
2.9.7
17.0.0 Darwin Kernel Version 17.0.0
Details about issue
I am able to mount the s3 bucket but all of the folders have permissions denied.
Why aren't the credentials working on the nested folders? Should I add a flag?
@strk commented on GitHub (Nov 16, 2017):
You can set the
umaskoption upon mounting, for example:@TT-JMay commented on GitHub (Nov 17, 2017):
I am having the same issue.
Amazon Simple Storage Service File System V1.82(commit:259f028) with OpenSSL
Linux ip-192-168-101-125 4.9.58-18.55.amzn1.x86_64 #1 SMP Thu Nov 2 04:38:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
fuse-2.9.4-1.17.amzn1.x86_64
Amazon Linux AMI release 2017.09
It is just odd that it will mount and everything looks good but then i cant interact with the bucket at all.
@avnerbarr commented on GitHub (Nov 22, 2017):
I tried like this
but still can't do anything like:
@strk commented on GitHub (Nov 23, 2017):
show the output of:
and of:
Does your user own the file ?
Or you can pass the
uidoption to make sure it does:Or change umask to be more widely open, like 0277
@ADTC commented on GitHub (Nov 23, 2017):
This is the only thing that worked for me... It needs to go into the readme!
@strk commented on GitHub (Nov 23, 2017):
+1
And maybe should also be the default (not sure why non-root user can
mount w/out being the owner of what's mounted, and w/out having at
least full read permission on that)
@ggtakec commented on GitHub (Nov 26, 2017):
@avnerbarr @ADTC @strk I added FAQ about this case.
https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ#q-could-not-access-filesdirectories-by-permission-denied
Please see/check it, and if you have a problem please reopen this issue.
Thanks in advance for your assistance.
@avnerbarr commented on GitHub (Nov 28, 2017):
I don't understand how i should mount using the uid option.
Can you please elaborate?
I tried taking the id from the passwd file and putting it in the mount command (i tried several variations of the following)
always get this error
@strk commented on GitHub (Nov 28, 2017):
What's the value of 'my token' ? It should be an integer value,
the 3rd field in /etc/passwd, or what is reported as "uid"
from the
idcommand@zewt commented on GitHub (Jun 27, 2018):
The behavior when there's no s3fs metadata is confusing. It should use reasonable defaults (owned by the mounting user, 0600 permissions), so you can mount any bucket without having to search through the FAQ to figure out why you're seeing this:
09:50 PM user@linux/7 [~] ls test
---------- 1 root root 3096 Mar 15 2017 test.txt
---------- 1 root root 59183 Mar 15 2017 test2.txt
which is what everyone currently sees when they follow the examples to mount an existing bucket.
@momania commented on GitHub (Jul 12, 2018):
Agree with above. Documentation makes it look like this is a no-brainer and easy to setup and use, but in practice I can't get anything to work, as permissions are one big mess and too confusing to get working.
@solomonxie commented on GitHub (Oct 31, 2018):
this works for me, and it has to have both
uidandgid.my id is:
without pointing out
gid, its permission will be denied everytime@AndresPineros commented on GitHub (Nov 1, 2018):
This shouldn't be placed in the FAQ, this should be in the usage steps.
@solomonxie commented on GitHub (Nov 1, 2018):
That's what i'm thinking as well, better to be in the README.md for majority who encounter this problem.
@zewt commented on GitHub (Nov 1, 2018):
It's not a documentation problem, it's just not great default behavior. It seems like the current defaults assume that people are mostly using this with buckets that are only used with S3FS and its special permission metadata exists. But, surely the most common use is to mount an existing S3 bucket created elsewhere, as a convenient way to access a webpage bucket, etc.
It should just default to 0600 permissions and the mounting user's UID when permission metadata doesn't exist, so you don't need to jump hoops with mount options.
I think saving file ownership to metadata shouldn't be enabled by default, either. It's just something to cause problems when you mount a bucket on multiple systems. This is a view into an S3 bucket, after all not an NFS mount...
@KES777 commented on GitHub (Nov 14, 2018):
This also can belongs to fuse configuration itself. Read this
@krisnova commented on GitHub (Dec 16, 2018):
On a macbook:
@polvoazul commented on GitHub (Jan 11, 2019):
just use $UID variable!
s3fs bucket /mount/point -o umask=0007,uid=$UID@gaul commented on GitHub (Jan 11, 2019):
@zewt Agree that permissions frustrate users but s3fs is trying to give the highest-fidelity POSIX filesystem that the S3 API allows. This is obviously not possible in all situations and some of the defaults probably do more harm than good. As a counterpoint, goofys makes different tradeoffs in POSIX vs. performance and ease of use. I opened #890 to track changing the defaults.
@adnangul commented on GitHub (Sep 13, 2019):
Still unable to get it working, I'm using role instead of secret. Unable to write, copy anything in the folder
s3fs -o iam_role="liferay-ec2" -o url="https://s3.us-east-2.amazonaws.com" -o endpoint=us-east-2 -o dbglevel=info -o curldbg -o allow_other -o use_cache=/tmp -o nonempty -o umask=0007,uid=1000,gid=1000 bucket /home/ec2-user/liferaymedia/document_library
uid, gid are correct obtained using 'id' command
@99aulas commented on GitHub (Oct 2, 2019):
I am not using umask= 0007. I´m using umask=0000. In my case the directory is a sub directory of webserver that send some files to S3. the owner must be ec2-user because of pipeline user and the group must be apache because of running.
@squalsoft commented on GitHub (Mar 31, 2020):
You can get your uid with command: echo $UID
@lysukhin commented on GitHub (Nov 2, 2020):
In my case the problem was not gone even after I've added all the necessary masks & UIDs.
The reason was an accidental
sudoat the mounting command. Removing it made everything ok.@anthonymobile commented on GitHub (Jan 4, 2021):
me too
@ognjen-it commented on GitHub (Jan 29, 2021):
I have a simular problem. I have linux user "myusername" and his uid is 1001.
When I try to cat file from this folder I get error:
cat: s3dir/test.txt: Input/output errorMy command for mounting is:
s3fs "mybackentrealname123" /home/myusername/s3dir -o passwd_file=/etc/passwd-s3fs,use_path_request_style,gid=1001,uid=1001,mp_umask=0007,allow_other,rw,dbglevel=info -f
IAM policy:
error:
@sitzbrau commented on GitHub (Apr 4, 2024):
i also fixed with
this is my complete command (remove '<>':
sudo s3fs <PUT S3 ID HERE> <PUT MOUNT FOLDER PATH HERE> -o iam_role=<IAM ROLE FOR EC2> -o use_cache=/opt/dlami/nvme -o allow_other -o uid=1000 -o mp_umask=0007 -o multireq_max=5 -o use_path_request_styleyou need to create a IAM ROLE with "AmazonS3FullAccess" for EC2 INSTANCES
@KES777 commented on GitHub (Apr 22, 2024):
Strange, why issues are closed when they were not resolved yet?
@aza1200 commented on GitHub (Jul 30, 2024):
In my Case [Mac OS] about the permission Issue
The command line
was not working in my mac ITerm Terminal
But it was working when i changed to MAC OS Terminal