2

Is it possible to mount some devices without being root and without having sudo permissions?

2

Yes you can do it using pmount.

man pmount

NAME
       pmount - mount arbitrary hotpluggable devices as normal user

pmount <device> [ label ] 

Example:

 pmount /dev/sdb1 flash_drive

This will mount the device /dev/sdb1 at /media/flash_drive.

Policy:

The mount will succeed if all of the following conditions are met:

   · device is a block device in /dev/

   · device is not in /etc/fstab (if it is, pmount executes  mount  device
     as the calling user to handle this transparently). See below for more
     details.

   · device is not already mounted according to /etc/mtab and /proc/mounts

   · if the mount point already exists, there is no device already mounted
     at it and the directory is empty

   · device   is   removable   (USB,   FireWire,   or   MMC   device,   or
     /sys/block/drive/removable is 1) or whitelisted in /etc/pmount.allow.

   · device is not locked

To unmount the device, use pumount, like so:

pumount <device>

Example:

 pumount /dev/sdb1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.