Applies to openSUSE Leap 42.3

8 Accessing File Systems with FUSE

Abstract

FUSE is the acronym for file system in user space. This means you can configure and mount a file system as an unprivileged user. Normally, you need to be root for this task. FUSE alone is a kernel module. Combined with plug-ins, it allows you to extend FUSE to access almost all file systems like remote SSH connections, ISO images, and more.

8.1 Configuring FUSE

Before you can use FUSE, you need to install the package fuse. Depending which file system you want to use, you need additional plug-ins available as separate packages. For an overview, see Section 8.5, “Available FUSE Plug-ins”.

Generally you do not need to configure FUSE. However, it is a good idea to create a directory where all your mount points are combined. For example, you can create a directory ~/mounts and insert your subdirectories for your different file systems there.

8.2 Mounting an NTFS Partition

NTFS, the New Technology File System, is the default file system of Windows. Since under normal circumstances the unprivileged user cannot mount NTFS block devices using the external FUSE library, the process of mounting a Windows partition described below requires root privileges.

  1. Become root and install the package ntfs-3g.

  2. Create a directory that is to be used as a mount point, for example ~/mounts/windows.

  3. Find out which Windows partition you need. Use YaST and start the partitioner module to see which partition belongs to Windows, but do not modify anything. Alternatively, become root and execute /sbin/fdisk -l. Look for partitions with a partition type of HPFS/NTFS.

  4. Mount the partition in read-write mode. Replace the placeholder DEVICE with your respective Windows partition:

    ntfs-3g /dev/DEVICE MOUNT POINT

    To use your Windows partition in read-only mode, append -o ro:

    ntfs-3g /dev/DEVICE MOUNT POINT -o ro

    The command ntfs-3g uses the current user (UID) and group (GID) to mount the given device. If you want to set the write permissions to a different user, use the command id USER to get the output of the UID and GID values. Set it with:

    id tux
    uid=1000(tux) gid=100(users) groups=100(users),16(dialout),33(video)
    ntfs-3g /dev/DEVICE MOUNT POINT -o uid=1000,gid=100

    Find additional options in the man page.

To unmount the resource, run fusermount -u MOUNT POINT.

8.3 Mounting Remote File System with SSHFS

SSH, the secure shell network protocol, can be used to exchange data between two computers using a secure channel. To establish an SSH connection through FUSE, proceed as follows:

  1. Install the package sshfs.

  2. Create a directory that is to be used as a mount point. A good idea is to use ~/mounts/HOST. Replace HOST with the name of your remote computer.

  3. Mount the remote file system:

    sshfs USER:HOST MOUNT POINT
  4. Enter your password for the remote computer.

To unmount the resource, run fusermount -u MOUNT POINT.

8.4 Mounting an ISO File System

To look into an ISO image, you can mount it with the fuseiso package:

  1. Install the package fuseiso.

  2. Create a directory that is to be used as a mount point, for example ~/mounts/iso.

  3. Mount the ISO image:

    fuseiso ISO_IMAGE MOUNT POINT

You can only read content from the ISO image, but you can not write back. To unmount the resource, use fusermount -u MOUNT POINT.

8.5 Available FUSE Plug-ins

FUSE is dependent on plug-ins. The following table lists common plug-ins.

Table 8.1: Available FUSE Plug-ins

curlftpfs

mount FTP servers

encfs

mount encrypted file systems

fuseiso

mounts CD-ROM images with ISO9660 file systems in them

fusepod

mount iPods

fusesmb

mount browseable Samba clients or Windows shares

gphotofs

mount supported digital cameras through gPhoto

ntfs-3g

mount NTFS volumes (with read and write support)

obexfs

mount Bluetooth devices

sshfs

file system client based on SSH file transfer protocol

wdfs

mount WebDAV file systems

8.6 For More Information

See the home page http://fuse.sourceforge.net of FUSE for more information.

Print this page