Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 7365  / 3 Years ago, fri, october 8, 2021, 7:35:18

I have installed s3fs and made a bucket with aws S3. I am able to write to it. But when I upload a file to the bucket and try reading it I get the following error.




You do not have the permissions necessary to open the file.




I've tried chmod 777 and I don't have permissions, I've tried sudo and I still don't have permissions.



I mount my drive by typing the following line:



s3fs babylon ~/MyMount -o passwd_file=~/.passwd-s3fs


How can I get permissions to access my files? Looking at them with ls -l I see the following:



~/MyMount$ ls -l
total 5
---------- 1 root root 2272 Mar 25 21:47 lab8.cpp
-rw-rw-r-- 1 kaz kaz 16 Mar 24 22:44 nextday.txt
---------- 1 root root 586 Mar 20 13:27 sample.c
-rw-rw-r-- 1 kaz kaz 6 Mar 26 01:29 temp.txt

More From » 16.04

 Answers
6

Since I found a fix for this I feel obligated to share it sense I asked for help.



What worked for me was fixing my permission immediately via the mount command like so:



s3fs babylon ~/MyMount -o passwd_file=~/.passwd-s3fs -o umask=0000


Umask works like a subtractor so with all 0s it sets things to 777. When I open my bucket via a script I made I now see the following:



-rwxrwxrwx 1 kaz  kaz       0 Mar 26 03:11 drfg.txt
-rwxrwxrwx 1 kaz root 2272 Mar 26 19:48 lab8.cpp
-rwxrwxrwx 1 kaz kaz 16 Mar 24 22:44 nextday.txt
-rwxrwxrwx 1 kaz root 814493 Mar 26 19:48 Refactoring - A good example.pdf
-rwxrwxrwx 1 root root 522010 Mar 26 20:06 revy_3.jpg
-rwxrwxrwx 1 kaz root 586 Mar 26 19:49 sample.c
-rwxrwxrwx 1 kaz kaz 6 Mar 26 01:29 temp.txt


I hope that this helps anyone struggling with s3fs.


[#11766] Saturday, October 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
assionortly

Total Points: 423
Total Questions: 121
Total Answers: 115

Location: Chad
Member since Wed, Sep 30, 2020
4 Years ago
;