1

I am having an issue getting my s3 to automatically mount properly after restart. I am running an AWS ECS c5d using ubuntu 16.04. I able able to use s3fs to connect to my S3 drive manually using:

$s3fs -o uid=1000,umask=077,gid=1000 s3drive ~/localdata

Afterwards when I go into the folder I can see and change my S3 files. But when I try to set it up for automatically connecting I can't get it to work. I have tried adding the following to etc/fstab:

s3drive /home/ubuntu/localdata fuse.s3fs _netdev,passwd_file=/home/ubuntu/.passwd-s3fs, uid=1000,umask=077,gid=1000   0 0

It processes but when I go to the location and $ls -lah I see an odd entry for permissions (and I am denied permission to cd into it):

d?????????  ? ?      ?         ?            ? localdata

I get the same result when I start fresh and try adding to /etc/fstab:

s3fs#s3drive /home/ubuntu/localdata fuse _netdev,passwd_file=/home/ubuntu/.passwd-s3fs,uid=1000,umask=077,gid=1000   0 0

Lastly I tried added to /etc/re.local just above the exit 0 row either:

s3fs -o uid=1000,umask=077,gid=1000 s3drive ~/localdata  

or

s3fs -o _netdev,uid=1000,umask=077,gid=1000 s3drive ~/localdata

When I reboot nothing seems to happen (i.e. no connection). But if I run it manually using:

$ sudo /etc/rc.local start

I get the same weird entry for my drive

d?????????  ? ?      ?         ?            ? localdata

Any ideas how to do this right? or what the ? ? ? permissions mean? I really hope this isn't a duplicate but i searched the existing answers and tried stuff for the whole afternoon.

3
  • This was cross posted to serverfault.com/questions/943241/… :-( See meta.stackexchange.com/questions/64068/… for why it is considered best practice to pick one site (note stackoverflow is for programming questions rather than general system usage questions so in this case posting to serverfault was correct but posting here won't be seen positively) Commented Dec 7, 2018 at 8:40
  • Thanks for pointing it out. I won't do it again. Commented Dec 7, 2018 at 12:53
  • Not to worry just an FYI. BTW did you see the comments over on that issue? Commented Dec 7, 2018 at 13:35

2 Answers 2

1

Looks like permission problem.

Verify AWS keys in pass ~/.passwd-s3fs are correct, chmod is 600, and IAM user has correct permissions to that bucket.

Sign up to request clarification or add additional context in comments.

1 Comment

I think it was a permissions issue - but on ubuntu not on S3 (if that makes sense?) Here is what I did to fix based on a response on stack exchange: I edited /etc/fuse.conf to uncomment the line with user_allow_other. Then I added allow_other to my list of mounting options in the s3fs /etc/fstab line. This worked on a real reboot - drive was mounted and accessible. But it still gave an error message when I tested using $sudo mount -a. This was fixed by adding the nonempty option to the s3fs line in /etc/fstab. –
0

You probably need a higher version of s3fs: https://github.com/s3fs-fuse/s3fs-fuse/issues/1018

Either upgrade you ubuntu to 20.04 or host a docker container with ubuntu 20.04 (or some other distro), map you local folder to a folder inside container using volumes and setup s3fs inside that container using fstab.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.