ext2srv – ext2 file system


ext2srv [ -vrs ] [ -f file ] [ -p passwd ] [ -g group ] [ service ]


Ext2srv is a file server that interprets the Linux Second Extended File System. A single instance of ext2srv can provide access to multiple ext2 partitions simultaneously.

Ext2srv posts a file descriptor named service (default ext2) in the /srv directory. To access an ext2 file system on a device, use mount with the spec argument (see bind(1)) the name of the file holding the raw ext2 file system, typically the disk or partition. If spec is undefined in the mount, ext2srv will use file as the default name for the device holding the file system.

Normally ext2srv creates a pipe to act as the communications channel between itself and its clients. The -s flag instructs ext2srv to use its standard input and output instead. This flag also prevents the creation of an explicit service file in /srv.

The -v flag causes verbose output for debugging, while the -r flag (recommended) makes the file system read-only. The optional -p and -g flags specify Unix-format password (respectively group) files that give the mapping between the numeric user- and group-ID numbers in the ext2 file system and the strings reported by Plan 9 status inquiries.

There is no authentication or permission checking. Anyone who can access the ext2 file system will have full access to all its files, including write access if ext2srv is not started with the -r flag, irrespective of file ownership and permission flags.

Some file system state is cached in memory, and may be flushed only when the file system is unmounted. Therefore if ext2srv is stopped or the machine is rebooted while an ext2 file system is still mounted, the superblock on the device will have been marked ‘not valid’ (unless the -r flag was used), and a fsck will be required before that file system may be mounted again.


There is no authentication or permission checking. The implementation has not tracked any changes to the ext2 specification since it was written. There may be other bugs. It is advisable to use ext2srv in read-only mode whenever possible.


Bodet Laurent (bl@mime.univ-paris8.fr), with later updates by Russ Cox and Richard Miller.