[GH-ISSUE #647] fuse: device not found, try 'modprobe fuse' first #365

Closed
opened 2026-03-04 01:44:47 +03:00 by kerem · 22 comments
Owner

Originally created by @yellowmamba on GitHub (Sep 18, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/647

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.

  • Version of s3fs being used (s3fs --version)
Amazon Simple Storage Service File System V1.82(commit:c5c1101) with OpenSSL
Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>
License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • Version of fuse being used (pkg-config --modversion fuse)
    2.9.4

  • System information (uname -a)
    Linux fae8d21da480 4.9.43-17.38.amzn1.x86_64 #1 SMP Thu Aug 17 00:20:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

  • Distro (cat /etc/issue)
    Ubuntu 16.04 LTS \n \l

  • s3fs command line used (if applicable)
    N/A

  • /etc/fstab entry (if applicable):

# UNCONFIGURED FSTAB FOR BASE SYSTEM
my-bucket-name /mnt/s3-bucket fuse.s3fs _netdev,allow_other,umask=000,default_acl=public-read,use_cache=/tmp 0 0
  • s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
    if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
fuse: device not found, try 'modprobe fuse' first

Details about issue

I am not sure why, it used to work for my other projects. When I am prompt with this error message, I tried modprobe fuse and got bash: modprobe: command not found. Really out of ideas of what went wrong. Can anyone assist?

Thanks

Originally created by @yellowmamba on GitHub (Sep 18, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/647 #### 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._ - Version of s3fs being used (s3fs --version) ``` Amazon Simple Storage Service File System V1.82(commit:c5c1101) with OpenSSL Copyright (C) 2010 Randy Rizun <rrizun@gmail.com> License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. ``` - Version of fuse being used (pkg-config --modversion fuse) `2.9.4` - System information (uname -a) `Linux fae8d21da480 4.9.43-17.38.amzn1.x86_64 #1 SMP Thu Aug 17 00:20:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux` - Distro (cat /etc/issue) `Ubuntu 16.04 LTS \n \l` - s3fs command line used (if applicable) **N/A** - /etc/fstab entry (if applicable): ``` # UNCONFIGURED FSTAB FOR BASE SYSTEM my-bucket-name /mnt/s3-bucket fuse.s3fs _netdev,allow_other,umask=000,default_acl=public-read,use_cache=/tmp 0 0 ``` - s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs) _if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages_ ``` fuse: device not found, try 'modprobe fuse' first ``` #### Details about issue I am not sure why, it used to work for my other projects. When I am prompt with this error message, I tried `modprobe fuse` and got `bash: modprobe: command not found`. Really out of ideas of what went wrong. Can anyone assist? Thanks
kerem closed this issue 2026-03-04 01:44:47 +03:00
Author
Owner

@yellowmamba commented on GitHub (Sep 18, 2017):

hmm, I am pretty sure now it's because of this line in /etc/fstab

# UNCONFIGURED FSTAB FOR BASE SYSTEM

But I have no idea why it's not configured.

<!-- gh-comment-id:330144860 --> @yellowmamba commented on GitHub (Sep 18, 2017): hmm, I am pretty sure now it's because of this line in `/etc/fstab` ``` # UNCONFIGURED FSTAB FOR BASE SYSTEM ``` But I have no idea why it's not configured.
Author
Owner

@yellowmamba commented on GitHub (Sep 19, 2017):

OK, it was due to docker run permission issue, need a --privileged flag. Unrelated to s3fs itself. Sorry.

<!-- gh-comment-id:330398877 --> @yellowmamba commented on GitHub (Sep 19, 2017): OK, it was due to docker run permission issue, need a `--privileged` flag. Unrelated to s3fs itself. Sorry.
Author
Owner

@audiofeature commented on GitHub (Feb 14, 2018):

@yellowmamba Can you explain in more detail how this is solved? I don't know where to use that --privileged flag.

<!-- gh-comment-id:365581357 --> @audiofeature commented on GitHub (Feb 14, 2018): @yellowmamba Can you explain in more detail how this is solved? I don't know where to use that --privileged flag.
Author
Owner

@yellowmamba commented on GitHub (Feb 14, 2018):

Hi @audiofeature , it's a flag you can attach to docker, i.e. docker run --privileged.

<!-- gh-comment-id:365775648 --> @yellowmamba commented on GitHub (Feb 14, 2018): Hi @audiofeature , it's a flag you can attach to docker, i.e. `docker run --privileged`.
Author
Owner

@sougiovn commented on GitHub (Mar 12, 2018):

@yellowmamba not every hero wears a cape...
How did you figured this out?

<!-- gh-comment-id:372456060 --> @sougiovn commented on GitHub (Mar 12, 2018): @yellowmamba not every hero wears a cape... How did you figured this out?
Author
Owner

@braco commented on GitHub (Apr 17, 2018):

There has to be some way to fix this with a pure Dockerfile

<!-- gh-comment-id:382065081 --> @braco commented on GitHub (Apr 17, 2018): There has to be some way to fix this with a pure Dockerfile
Author
Owner

@rustyx commented on GitHub (May 29, 2018):

--privileged gives too many permissions to the container.

FUSE functionality needs in fact only the following permissions:

--cap-add SYS_ADMIN --device /dev/fuse

SYS_ADMIN is needed for mount/umount functionality, and /dev/fuse exposes the FUSE device to the container.

<!-- gh-comment-id:392697838 --> @rustyx commented on GitHub (May 29, 2018): `--privileged` gives too many permissions to the container. FUSE functionality needs in fact only the following permissions: ``` --cap-add SYS_ADMIN --device /dev/fuse ``` SYS_ADMIN is needed for mount/umount functionality, and `/dev/fuse` exposes the FUSE device to the container.
Author
Owner

@diman82 commented on GitHub (Jan 6, 2019):

I'm still facing this issue, running docker-compose with 'privileged: true' in yml file.
Any ideas what I'm missing?

<!-- gh-comment-id:451776648 --> @diman82 commented on GitHub (Jan 6, 2019): I'm still facing this issue, running docker-compose with 'privileged: true' in yml file. Any ideas what I'm missing?
Author
Owner

@gnosisgithub commented on GitHub (Nov 21, 2019):

So 'docker --privileged run ...'?

<!-- gh-comment-id:557138282 --> @gnosisgithub commented on GitHub (Nov 21, 2019): So 'docker --privileged run ...'?
Author
Owner

@Dr-Steve commented on GitHub (Mar 12, 2020):

This does not work in the context of AWS and Fargate, where you are not allowed to run with --privileged or --device (see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)

Is there any way to get around this?

<!-- gh-comment-id:598382095 --> @Dr-Steve commented on GitHub (Mar 12, 2020): This does not work in the context of AWS and Fargate, where you are not allowed to run with --privileged or --device (see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) Is there any way to get around this?
Author
Owner

@ChrisPappalardo commented on GitHub (May 23, 2020):

I have the same issue as @Dr-Steve. I tried following this answer and ran into the device not found here discussed here. If I set privileged mode in development, it works, but that is not supported by AWS Fargate. Is there a recommended way to use s3fs with AWS Fargate that is also compatible with ecs-cli?

<!-- gh-comment-id:632969902 --> @ChrisPappalardo commented on GitHub (May 23, 2020): I have the same issue as @Dr-Steve. I tried following [this answer](https://stackoverflow.com/a/60556131/5451813) and ran into the device not found here discussed here. If I set privileged mode in development, it works, but that is not supported by AWS Fargate. Is there a recommended way to use s3fs with AWS Fargate that is also compatible with ecs-cli?
Author
Owner

@nminhquang commented on GitHub (Jun 2, 2020):

Try to run docker container with these options:
--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined

<!-- gh-comment-id:637458150 --> @nminhquang commented on GitHub (Jun 2, 2020): Try to run docker container with these options: --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined
Author
Owner

@dnz-bdeboer commented on GitHub (Jul 29, 2021):

In case people come back here and think the last solution applies to Fargate: it does not. Fargate does not support SYS_ADMIN capability. You probably need to run your container in ECS. No big deal.

<!-- gh-comment-id:888709577 --> @dnz-bdeboer commented on GitHub (Jul 29, 2021): In case people come back here and think the last solution applies to Fargate: it does not. Fargate does not support SYS_ADMIN capability. You probably need to run your container in ECS. No big deal.
Author
Owner

@ChrisPappalardo commented on GitHub (Jul 29, 2021):

Following up on this, I abandoned using s3fs in ECS with Fargate, it's much cleaner and easier using EFS which can be mounted via the task definition. If you really need to use S3, I suggest using it at the app level via an SDK (such as boto3 in python). S3 just isn't great for block-level storage in my opinion and I've had multiple issues trying to implement it that way.

<!-- gh-comment-id:888721718 --> @ChrisPappalardo commented on GitHub (Jul 29, 2021): Following up on this, I abandoned using s3fs in ECS with Fargate, it's much cleaner and easier using EFS which can be mounted via the task definition. If you really need to use S3, I suggest using it at the app level via an SDK (such as boto3 in python). S3 just isn't great for block-level storage in my opinion and I've had multiple issues trying to implement it that way.
Author
Owner

@ayush5112 commented on GitHub (Dec 30, 2021):

I am getting the problem of permission denied on my system when I try to access a database mounted directory :
ls: cannot access '/home/ayushk/dla/scratch.dla': Permission denied
So, I tried to mount the directory from the docker itself but the error says :
fuse: device not found, try 'modprobe fuse' first
If we give --privileged option in the command to run the docker then error when is :
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: failed to write "a : rwm": write /sys/fs/cgroup/devices/docker/39b947e020815aae5bbdb0ad03dff2b6d662b96e8ed3dc898a92237e26bbd5f9/devices.allow: operation not permitted: unknown.

So how can we mount a directory on docker?

<!-- gh-comment-id:1002963438 --> @ayush5112 commented on GitHub (Dec 30, 2021): I am getting the problem of permission denied on my system when I try to access a database mounted directory : **ls: cannot access '/home/ayushk/dla/scratch.dla': Permission denied** So, I tried to mount the directory from the docker itself but the error says : **fuse: device not found, try 'modprobe fuse' first** If we give --privileged option in the command to run the docker then error when is : docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: failed to write "a *:* rwm": write /sys/fs/cgroup/devices/docker/39b947e020815aae5bbdb0ad03dff2b6d662b96e8ed3dc898a92237e26bbd5f9/devices.allow: operation not permitted: unknown. So how can we mount a directory on docker?
Author
Owner

@Abdelrahman-Abbas commented on GitHub (Feb 1, 2022):

Did anyone solve such an issue when working with google cloud build to build the docker? I think it doesn't have the --privileged option. Any help?

<!-- gh-comment-id:1026591838 --> @Abdelrahman-Abbas commented on GitHub (Feb 1, 2022): Did anyone solve such an issue when working with google cloud build to build the docker? I think it doesn't have the `--privileged` option. Any help?
Author
Owner

@sinnrrr commented on GitHub (May 14, 2022):

to add this permission to docker-compose managed container add the following to the config file:

    cap_add:
      - SYS_ADMIN
    devices:
      - /dev/fuse
<!-- gh-comment-id:1126826473 --> @sinnrrr commented on GitHub (May 14, 2022): to add this permission to docker-compose managed container add the following to the config file: ```yaml cap_add: - SYS_ADMIN devices: - /dev/fuse ```
Author
Owner

@lebyanelm commented on GitHub (Jul 18, 2022):

How do you apply these fixes on a docker container running under kubectl?

<!-- gh-comment-id:1187235265 --> @lebyanelm commented on GitHub (Jul 18, 2022): How do you apply these fixes on a docker container running under **kubectl**?
Author
Owner

@KMint1819 commented on GitHub (Mar 31, 2024):

I've tried --cap-add SYS_ADMIN --device /dev/fuse but then it shows

fuse: mount failed: Permission denied

Cannot mount AppImage, please check your FUSE setup.
<!-- gh-comment-id:2028587027 --> @KMint1819 commented on GitHub (Mar 31, 2024): I've tried `--cap-add SYS_ADMIN --device /dev/fuse` but then it shows ```bash fuse: mount failed: Permission denied Cannot mount AppImage, please check your FUSE setup. ```
Author
Owner

@kjxbyz commented on GitHub (Jul 2, 2024):

@KMint1819 it works for me.

--cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined
<!-- gh-comment-id:2201881938 --> @kjxbyz commented on GitHub (Jul 2, 2024): @KMint1819 it works for me. ``` --cap-add SYS_ADMIN --device /dev/fuse --security-opt apparmor:unconfined ```
Author
Owner

@AmanYadav7089 commented on GitHub (Nov 28, 2024):

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.

  • Version of s3fs being used (s3fs --version)
Amazon Simple Storage Service File System V1.82(commit:c5c1101) with OpenSSL
Copyright (C) 2010 Randy Rizun <rrizun@gmail.com>
License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • Version of fuse being used (pkg-config --modversion fuse)
    2.9.4
  • System information (uname -a)
    Linux fae8d21da480 4.9.43-17.38.amzn1.x86_64 #1 SMP Thu Aug 17 00:20:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Distro (cat /etc/issue)
    Ubuntu 16.04 LTS \n \l
  • s3fs command line used (if applicable)
    N/A
  • /etc/fstab entry (if applicable):
# UNCONFIGURED FSTAB FOR BASE SYSTEM
my-bucket-name /mnt/s3-bucket fuse.s3fs _netdev,allow_other,umask=000,default_acl=public-read,use_cache=/tmp 0 0
  • s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs)
    if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
fuse: device not found, try 'modprobe fuse' first

Details about issue

I am not sure why, it used to work for my other projects. When I am prompt with this error message, I tried modprobe fuse and got bash: modprobe: command not found. Really out of ideas of what went wrong. Can anyone assist?

Thanks

that issue solve by use one property in kubernetes deployment inside container
securityContext:
privileged: true

<!-- gh-comment-id:2505431109 --> @AmanYadav7089 commented on GitHub (Nov 28, 2024): > #### 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._ > > * Version of s3fs being used (s3fs --version) > > ``` > Amazon Simple Storage Service File System V1.82(commit:c5c1101) with OpenSSL > Copyright (C) 2010 Randy Rizun <rrizun@gmail.com> > License GPL2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > ``` > > * Version of fuse being used (pkg-config --modversion fuse) > `2.9.4` > * System information (uname -a) > `Linux fae8d21da480 4.9.43-17.38.amzn1.x86_64 #1 SMP Thu Aug 17 00:20:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux` > * Distro (cat /etc/issue) > `Ubuntu 16.04 LTS \n \l` > * s3fs command line used (if applicable) > **N/A** > * /etc/fstab entry (if applicable): > > ``` > # UNCONFIGURED FSTAB FOR BASE SYSTEM > my-bucket-name /mnt/s3-bucket fuse.s3fs _netdev,allow_other,umask=000,default_acl=public-read,use_cache=/tmp 0 0 > ``` > > * s3fs syslog messages (grep s3fs /var/log/syslog, or s3fs outputs) > _if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages_ > > ``` > fuse: device not found, try 'modprobe fuse' first > ``` > > #### Details about issue > I am not sure why, it used to work for my other projects. When I am prompt with this error message, I tried `modprobe fuse` and got `bash: modprobe: command not found`. Really out of ideas of what went wrong. Can anyone assist? > > Thanks that issue solve by use one property in kubernetes deployment inside container securityContext: privileged: true
Author
Owner

@AmanYadav7089 commented on GitHub (Nov 28, 2024):

that issue solve by use one property in kubernetes deployment inside container
securityContext:
privileged: true

<!-- gh-comment-id:2505432008 --> @AmanYadav7089 commented on GitHub (Nov 28, 2024): > that issue solve by use one property in kubernetes deployment inside container > securityContext: > privileged: true
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#365
No description provided.