Coder Social home page Coder Social logo

fuse mount with root failed about fuse HOT 7 CLOSED

jacobsa avatar jacobsa commented on August 12, 2024
fuse mount with root failed

from fuse.

Comments (7)

stapelberg avatar stapelberg commented on August 12, 2024 1

Does this only happen when you’re running as root, or also as your user?

If it happens only as root, can you try sudo chown root.root /home/wangyang5/polefs/mnt and see if that helps?

If this is blocking you, a workaround would be to add a check for syscall.EINVAL and return errFallback in

if err == syscall.EPERM {

from fuse.

kungf avatar kungf commented on August 12, 2024

only root user has this problem

from fuse.

kungf avatar kungf commented on August 12, 2024

i find in man 2 mount

EINVAL source had an invalid superblock.

source is selfdefined fsname "polefs-wy3", i am not sure how mount get the superblock of source?
why fusermount is ok?

from fuse.

stapelberg avatar stapelberg commented on August 12, 2024

i find in man 2 mount

EINVAL source had an invalid superblock.

I don’t think this applies. The mount manpage was written for traditional file systems, not FUSE.

I just tried to reproduce the issue, but can’t:

From your log:

432551 mount("polefs-wy3", "/home/wangyang5/polefs/mnt", "fuse", MS_NODEV, "fd=12,rootmode=40000,user_id=0,group_id=0,default_permissions,subtype=polefs,allow_other") = -1 EINVAL (Invalid argument)

…but on my machine, this works fine:

mount("distri", "/ro", "fuse", MS_NODEV, "fd=3,rootmode=40000,user_id=0,group_id=0,allow_other,default_permissions,subtype=polefs") = 0

Which Linux version are you running this on? What are the steps to reproduce this issue in a clean installation?

from fuse.

kungf avatar kungf commented on August 12, 2024

Which Linux version are you running this on? What are the steps to reproduce this issue in a clean installation?

centos7 3.18.22 , do nothing special in after installation.
fusermount works fine in root.

from fuse.

stapelberg avatar stapelberg commented on August 12, 2024

So I set up a CentOS 7 VM (from CentOS-7-x86_64-Minimal-1908.iso) and ran yum -y update.

However, I get kernel version 3.10.0-1062.12.1.el7.x86_64, not 3.18.22?

Furthermore, mounting the sample file system (samples/mount_sample) works fine:

[root@localhost ~]# strace -fvy -s2048 -e mount /tmp/mount_sample --ready_file 1 -type flushfs --flushfs.flushes_file=2 -flushfs.fsyncs_file=2 -mount_point /mnt
[…]
[pid  9781] mount("", "/mnt", "fuse", MS_NOSUID|MS_NODEV, "fd=3,rootmode=40000,user_id=0,group_id=0,default_permissions") = 0
[…]

Can you please actually reproduce your problem in a clean VM and share the precise steps to reproduce?

from fuse.

stapelberg avatar stapelberg commented on August 12, 2024

Okay, so the issue only manifests itself once you start setting the Subtype FUSE mount option.

from fuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.