b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

Explanation: The Mount Options in the FSTAB File

by Jon on June 6th, 2006

I recent wrote about the format of the fstab file. One of the columns in the file specifies to the system how each file system should be mounted. There are a lot of possible options for that column, although the most common by far is defaults. Here are the other possibilities:

  • auto: allows the system to be mounted with the -a option. In essence, mount -a will mount all file systems specified in the fstab file except those with the noauto mount option.
  • defaults: a quick way to specify read/write/ suid/ dev/exec/auto/nouser/async.
  • exec: allows applications on the file system to be executable (good security potential)
  • noauto: opposite of auto (above)
  • noexec: opposite of exec (above)
  • nosuid: prevents the suid and sgid bits (if set) from being effective on the file system
  • nouser: prevents normal users from mounting or unmounting the file system
  • ro: read only
  • rw: read/write
  • suid: allows the suid and sgid bits to be effective on the file system
  • user: allows a user to mount a file system and the same user to unmount it
  • users: allows a user to mount a file sytem and any user to unmount it
  • There are three other options that I don’t fully understand yet:

  • dev
  • sync
  • async

Anyone want to step in and clarify those for us?

POSTED IN: Explanation

4 opinions for Explanation: The Mount Options in the FSTAB File

  • pellgarlic
    Jun 16, 2006 at 7:18 am

    “sync” means that data is written to the device immediately upon the command to copy or paste a file (”synchronously”). “async” means the data may not be written straight away (”asynchronously”).

    “sync” is best used for “removable” media, such as floppy drives, usb flash drives etc, which can be physically removed from the system quite easily. this will help avoid instances where the device is removed before the data is actually written to the device.

    “async” is best used for “fixed” drives, where the likelihood of the above scenario happening is slim. this way, the system can delay the actual writing of data onto the device if it is quite busy with other processes, to avoid slowing down the other processes. it can then write the data later, when there is more cpu power available.

  • Jon
    Jun 16, 2006 at 9:59 am

    Outstanding, thanks Pellgarlic!

  • New Linux User » HOWTO: Mount a File System
    Jan 22, 2007 at 7:56 pm

    […] My most recent posts talk about the fstab file, mount options, and file system types. Now that we have those things out of the way, we can talk more in depth about mounting a file system. […]

  • nqsonk9
    Nov 14, 2007 at 4:03 am

    Thanks for useful guilde, guys. Are “gid, umask, ntl …” options for fstab too, then how do they work ? Can you give me an example using nouser, user and users ?
    Thanks again :)

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing