Mounting Drives in Linux without Root

I recently took an interest in building my own debian box that was roughly equivelant to Linux Mint or Ubuntu. More specifically, I wanted a system built from a bare bones Debian base, but had all the functionality that was offered by the more major "end user" distributions. I wanted features such as media capabilities (video, DVDs, and music), surfing the internet, editing photos, etc.

As I used my system, I took note of what else I needed to add to it to make it more laptop friendly. One of the things it was missing was the ability to mount external storage devices (usb sticks for the most part) without being root. After many days of frustration, I finally caved and started making custom adjustments outside of simply installing software. Here is how you mount an external storage device in Debian Linux without needing root permissions.

It is really quite simple…

First, you need to configure the permissions on your mount location. In Debian Linux, this location is /media. The permissions on that directory are set by default to 744. When we mount an external device, we want a directory to be created in there to give mount a location to mount to. In light of this, we need the permissions on the /media directory to be 777. To achieve this, open your root cli and run the following command:

chmod -R 777 /media

And you should now be done!

For me however, I experienced a small problem with this. In my /etc/fstab file, there was an entry for a cdrom located at sdb1 there. Since that is not where my cdrom is located, I just commented out that line, and all worked as expected.

Just one more step towards the perfect Linux system.