Well, I'm a bit confused, so please, bear with me:

I have a Pi3 with Raspbian (huh, the latest one, can't remember the name) and an external HDD plugged to it. I've been doing tests and reading stuff, and noticed that I didn't really needed to run the desktop environment for the stuff I was using the pi, so I went sudo raspi-config and removed it (Boot Options -> Desktop/CLI -> Console Autologin) .

Now, for the record, this is the ls -l on the /media/pi folder before:

drwxr-xr-x 7 root root 4096 may  9  2014 RaspberryData

On reboot, I got a prompt telling me that "access denied". The ls -l is this:

drwx------ 2 root root 4096 oct 22 22:04 RaspberryData

Reading a bit, its telling me that when there's no Desktop, neither the "groups" triplet nor the "other" triplet don't have access. I guess the main problem is with the "groups" triplet, as with the Pixel environment I could read and execute stuff.

Now, I guess this could go with a chown on the folder/mountpoint, but before doing anything I would like to know the whys and hows, and if I'm mistaken, the whats (Then the whys and finally the hows).

1 Answer 1


It is unclear exactly what you are trying to do.

The automount is a feature of the GUI. This creates a directory under /media/pi and mounts external drives.

If you do not use the GUI NOTHING happens (although the directory may still exist in the filesystem from previous mounts). Modifying the permissions WON'T mount anything. It is possible to create automounts without the GUI but this is far from straightforward.

If you want to mount a drive (on boot or manually) you need to create an entry in /etc/fstab (the man gives examples, and there are lots of tutorials).

If this is what you want I strongly suggest avoiding /media and mount in /mnt - although you can create a mount point anywhere.

The following is a script I use to mount SD Cards as an example.

# 2017-05-06


# Check/create Mount Points
if [ ! -e $BOOT_MOUNT ]; then
    mkdir $BOOT_MOUNT
if [ ! -e $ROOT_MOUNT ]; then
    mkdir $ROOT_MOUNT
# Mount Partitions
if ! $(mountpoint -q $BOOT_MOUNT); then
    mount /dev/sda1 $BOOT_MOUNT # mount partition containing boot files
if ! $(mountpoint -q $ROOT_MOUNT); then
    mount /dev/sda2 $ROOT_MOUNT # mount root partition containing OS files
  • I was looking if Pixel did the automount (which looked like it) and, if it was doing it, how's that there was these differences on permissions between the pixel-started and the command line started permissions. Seems the best (and only) way to do it is through the fstab file, thanks! (Why would you suggest avoiding the /media/pi/ folder?)
    – Neuromante
    Oct 23, 2018 at 11:47
  • @Neuromante Pixel is DEAD, Long Live RPD!. Automount presumably happens somewhere in LXDE but I don't know where. /media is used by this process, and can get confused if mount points are manually created. /mnt is the traditional Linux directory.
    – Milliways
    Oct 23, 2018 at 22:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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