[GH-ISSUE #58] Permission issue when mounted via /etc/fstab but nor when called from CLI #35

Closed
opened 2026-03-04 01:41:23 +03:00 by kerem · 3 comments
Owner

Originally created by @jaygooby on GitHub (Sep 26, 2014).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/58

When I mount via /etc/fstab I can't create or copy files as a regular user:

$ whoami
jay
$ id -u 
1001
$ id -g 
1001
$ ls -ld /mnt/shared
drwxr-xr-x 2 jay jay 4096 2014-09-26 12:42 /mnt/shared
$ sudo mount /mnt/shared
$ ls -ld /mnt/shared 
drwxrwxrwx 1 jay jay 0 1970-01-01 01:00 /mnt/shared
$ cd /mnt/shared
$ touch test
touch: cannot touch `test': Input/output error

Here's the /etc/fstab entry:

s3fs#mybucket /mnt/shared fuse default_acl='public-read',use_cache='/mnt/.s3-cache',rw,del_cache,noatime,allow_other,uid=1001,gid=1001

and here's the line from the mount command:

fuse on /ebs/mnt/shared type fuse (rw,noatime,allow_other)

But if I unmount it, and then mount using the s3fs command, everything works as expected:

$ sudo umount /mnt/shared
$ ls -ld /mnt/shared
drwxr-xr-x 2 jay jay 4096 2014-09-26 12:42 /mnt/shared
$ sudo /usr/bin/s3fs mybucket /mnt/shared -o default_acl='public-read' -o use_cache='/mnt/.s3-cache' -o rw -o del_cache -o noatime -o allow_other -o uid=1001 -o gid=1001
$ mount
...
fuse on /ebs/mnt/shared type fuse (rw,nosuid,nodev,noatime,allow_other)
...
$ ls -ld /mnt/shared
drwxrwxrwx 1 jay jay 0 1970-01-01 01:00 /mnt/shared
$ touch test
$ ls -l test
-rw-r--r-- 1 jay jay 0 2014-09-26 16:37 test

Have I got the /etc/fstab entry incorrect? There is a slight difference shown by calling mount. Here's the /etc/fstab entry:

fuse on /ebs/mnt/shared type fuse (rw,noatime,allow_other)

and here's what it looks like when mounted from the s3fs commandline:

fuse on /ebs/mnt/shared type fuse (rw,nosuid,nodev,noatime,allow_other)

Is it a mistake on my part?

Originally created by @jaygooby on GitHub (Sep 26, 2014). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/58 When I mount via `/etc/fstab` I can't create or copy files as a regular user: ``` $ whoami jay $ id -u 1001 $ id -g 1001 $ ls -ld /mnt/shared drwxr-xr-x 2 jay jay 4096 2014-09-26 12:42 /mnt/shared $ sudo mount /mnt/shared $ ls -ld /mnt/shared drwxrwxrwx 1 jay jay 0 1970-01-01 01:00 /mnt/shared $ cd /mnt/shared $ touch test touch: cannot touch `test': Input/output error ``` Here's the `/etc/fstab` entry: ``` s3fs#mybucket /mnt/shared fuse default_acl='public-read',use_cache='/mnt/.s3-cache',rw,del_cache,noatime,allow_other,uid=1001,gid=1001 ``` and here's the line from the `mount` command: ``` fuse on /ebs/mnt/shared type fuse (rw,noatime,allow_other) ``` But if I unmount it, and then mount using the s3fs command, everything works as expected: ``` $ sudo umount /mnt/shared $ ls -ld /mnt/shared drwxr-xr-x 2 jay jay 4096 2014-09-26 12:42 /mnt/shared $ sudo /usr/bin/s3fs mybucket /mnt/shared -o default_acl='public-read' -o use_cache='/mnt/.s3-cache' -o rw -o del_cache -o noatime -o allow_other -o uid=1001 -o gid=1001 $ mount ... fuse on /ebs/mnt/shared type fuse (rw,nosuid,nodev,noatime,allow_other) ... $ ls -ld /mnt/shared drwxrwxrwx 1 jay jay 0 1970-01-01 01:00 /mnt/shared $ touch test $ ls -l test -rw-r--r-- 1 jay jay 0 2014-09-26 16:37 test ``` Have I got the `/etc/fstab` entry incorrect? There is a slight difference shown by calling `mount`. Here's the `/etc/fstab` entry: ``` fuse on /ebs/mnt/shared type fuse (rw,noatime,allow_other) ``` and here's what it looks like when mounted from the s3fs commandline: ``` fuse on /ebs/mnt/shared type fuse (rw,nosuid,nodev,noatime,allow_other) ``` Is it a mistake on my part?
kerem closed this issue 2026-03-04 01:41:24 +03:00
Author
Owner

@ggtakec commented on GitHub (Oct 13, 2014):

Hi, jaygooby

It looks like good for s3fs running.
I do not know what is wrong for this case, so if you can, please try to do following.

  • Adding "_netdev" option for s3fs line in fstab.
  • Adding "f2" option, it puts message into /var/log/messages(or other system log file), when something error occured.
  • please re-check /etc/passwd-s3fs, etc.
  • please check /tmp/.s3-cache directory permission.
  • etc...

We need to know why does not s3fs write file, for solving this issue.
Thanks in advance for your help.

<!-- gh-comment-id:58886260 --> @ggtakec commented on GitHub (Oct 13, 2014): Hi, jaygooby It looks like good for s3fs running. I do not know what is wrong for this case, so if you can, please try to do following. - Adding "_netdev" option for s3fs line in fstab. - Adding "f2" option, it puts message into /var/log/messages(or other system log file), when something error occured. - please re-check /etc/passwd-s3fs, etc. - please check /tmp/.s3-cache directory permission. - etc... We need to know why does not s3fs write file, for solving this issue. Thanks in advance for your help.
Author
Owner

@ai6pg commented on GitHub (Nov 20, 2014):

I have it working from fstab using
s3fs#s3bucket /mnt/s3 fuse rw,allow_other,uid=1000,gid=1000 0 2

<!-- gh-comment-id:63837529 --> @ai6pg commented on GitHub (Nov 20, 2014): I have it working from fstab using s3fs#s3bucket /mnt/s3 fuse rw,allow_other,uid=1000,gid=1000 0 2
Author
Owner

@ggtakec commented on GitHub (Jan 17, 2016):

I'm sorry about this Issue had been left at a long period of time.

If you have this problem yet, please try to use latest code.
("-f", "dbglevel" and "curldbg" options help to solve your problem.)
And if you found a problem, please post new issue.

Thanks in advance for your help.

<!-- gh-comment-id:172296947 --> @ggtakec commented on GitHub (Jan 17, 2016): I'm sorry about this Issue had been left at a long period of time. If you have this problem yet, please try to use latest code. ("-f", "dbglevel" and "curldbg" options help to solve your problem.) And if you found a problem, please post new issue. Thanks in advance for your help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#35
No description provided.