1pmount(1)                   General Commands Manual                  pmount(1)
2
3
4

NAME

6       pmount - mount arbitrary hotpluggable devices as normal user
7
8

SYNOPSIS

10       pmount [ options ] device
11
12       pmount [ options ] device label
13
14       pmount --lock [ options ] device pid
15
16       pmount --unlock [ options ] device pid
17
18

DESCRIPTION

20       pmount  ("policy mount") is a wrapper around the standard mount program
21       which permits normal users to mount removable devices without a  match‐
22       ing /etc/fstab entry.
23
24       pmount also supports encrypted devices which use dm-crypt and have LUKS
25       metadata. If a LUKS-capable cryptsetup is installed, pmount will use it
26       to  decrypt  the  device  first and mount the mapped unencrypted device
27       instead.
28
29       pmount is invoked like this:
30
31       pmount device [ label ]
32
33       This will mount device to a directory below /media  if  policy  is  met
34       (see  below).  If label is given, the mount point will be /media/label,
35       otherwise it will be /media/device.
36
37       The   device   will   be   mounted   with    the    following    flags:
38       async,atime,nodev,noexec,noauto,nosuid,user,rw
39
40       Some applications like CD burners modify a raw device which must not be
41       mounted while the burning process is in progress. To prevent  automatic
42       mounting,  pmount  offers a locking mechanism: pmount --lock device pid
43       will prevent the pmounting of device until it is unlocked  again  using
44       pmount  --unlock  device  pid. The process id pid assigns the lock to a
45       particular process; this allows to lock a device by several processes.
46
47       During mount, the list of locks is cleaned, i. e. all locks whose asso‐
48       ciated  process does not exist any more are removed. This prevents for‐
49       gotten indefinite locks from crashed programs.
50
51

POLICY

53       The mount will succeed if all of the following conditions are met:
54
55
56       · device is a block device in /dev/
57
58       · device is not in /etc/fstab (if it is, pmount executes  mount  device
59         as the calling user to handle this transparently)
60
61       · device is not already mounted according to /etc/mtab and /proc/mounts
62
63       · if the mount point already exists, there is no device already mounted
64         at it and the directory is empty
65
66       · device   is   removable   (USB,   FireWire,   or   MMC   device,   or
67         /sys/block/drive/removable is 1) or whitelisted in /etc/pmount.allow.
68
69       · device is not locked
70
71

OPTIONS

73       -r, --read-only
74              Force  the  device to be mounted read only. If neither -r nor -w
75              is specified, the kernel will choose an appropriate default.
76
77
78       -w, --read-write
79              Force the device to be mounted read/write. If neither -r nor  -w
80              is specified, the kernel will choose an appropriate default.
81
82
83       -s, --sync
84              Mount  the  device  with  the  sync  option, i. e. without write
85              caching. Default is async (write-back). With this option,  write
86              operations  are  much  slower and due to the massive increase of
87              updates of inode/FAT structures, flash devices may suffer  heav‐
88              ily if you write large files. This option is intended to make it
89              safe to just rip out USB drives without proper unmounting.
90
91
92       -A, --noatime
93              Mount the device with the noatime option. Default is atime.
94
95
96       -e, --exec
97              Mount the device with the exec option. Default is noexec.
98
99
100       -t filesystem, --type filesystem
101              Mount as specified file system type. The  file  system  type  is
102              automatically determined if this option is not given.
103
104
105       -c charset, --charset charset
106              Use given I/O character set (default: utf8 if called in an UTF-8
107              locale, otherwise mount  default).  This  corresponds  with  the
108              mount  option iocharset. This option is ignored for file systems
109              that do not support setting the character set (see mount (8) for
110              details).
111
112
113       -u umask, --umask umask
114              Use  specified  umask  instead  of the default one. For UDF, the
115              default is '007', for VFAT and NTFS the default is  '077'.  This
116              value  is  ignored for file systems which do not support setting
117              an umask.
118
119
120       --passphrase file
121              If the device is encrypted (dm-crypt with LUKS  metadata),  read
122              the  passphrase  from specified file instead of prompting at the
123              terminal.
124
125
126       -h, --help
127              Print a help message and exit successfully.
128
129
130       -d, --debug
131              Enable verbose debug messages.
132
133
134       --version
135              Print the current version number and exit successfully.
136
137

FILES

139       /etc/pmount.allow
140              List of devices (one device per  line)  which  are  additionally
141              permitted for pmounting.
142
143

SEE ALSO

145       pumount(1), mount(8)
146
147

AUTHOR

149       pmount is developed by Martin Pitt <martin.pitt@canonical.com>.
150
151
152
153Martin Pitt                     August 27, 2004                      pmount(1)
Impressum