Explanation: The Mount Options in the FSTAB File

Posted in Technology
Tue, Jun 6 - 5:56 am EDT | 12 years ago by
Comments: 6
Be Sociable, Share!
Use Arrow Keys (← →) to Browse

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?

Use Arrow Keys (← →) to Browse

Be Sociable, Share!

Related Posts

  • pellgarlic

    “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.

  • http://www.newlinuxuser.com Jon

    Outstanding, thanks Pellgarlic!

  • Pingback: New Linux User » HOWTO: Mount a File System

  • nqsonk9

    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 :)

  • Pingback: Getting Gnome Volume Manager to Play Nice « Helpful Linux Tidbits

  • Silver Knight

    I’m fairly certain that the dev and nodev options cause that mounted filesystem to either interpret or NOT interpret special device files (named pipes, device nodes, and such).

Be Sociable, Share!