Not able to cd or ls into drive mounted by s3fs

An issue I encountered with not being able to move into a drive mounted by s3fs

Earlier I was playing with S3FS to mount an Amazon S3 instance as a drive on a linux machine.

The mount appeared to work correctly but I experienced some issues around navigating around the mounted drive, some investigation showed that the files and folders that were coming from Amazon where all down as being owned by root.

This shouldn’t have been the case.

The fix I used was to pass the user ID and group ID into the parameters that the mount used within /etc/fstab.

This is what my /etc/fstab looked like;

s3fs#my_mount /mnt/my_mount fuse allow_other,uid=1000,default_acl=public-read,gid=1000 0 0

In the above then uid is the user ID you want to associate the mount with and gid is the group.

In Ubuntu to find the user ID I normally run cat /etc/passwd which lists all the users and their IDs and to get the group ID I run cat /etc/group which displays all the groups along with their IDs.

Recent posts View all

VS CodeWeb Dev

Select multiple lines in VS Code

How to select multiple lines to edit at once within VS Code

VS Code Web Dev

Move a line up or down with VS Code

A quick tip on moving lines up or down a file using your keyboard in VS Code