I got a permission denied when I am trying to cd inside a directory.

I could chown it for my user, however I'm wondering if the problem is elsewhere:

The directory in question is an automatic directory added inside /media when I plug my usb external drive. I have read that the points inside /media are automatically removed, so I doubt about the usefulness of my chown.

Is there a way to give access to the user to all the usb things I'm going to plug that will appear inside /media ?

Edit: I rebooted, with the drive unplugged, logged in, then plugged the drive, and then it appears ready to be mounted in PcManFM.

From what I have seen, when it's mounted, there's a point /media/MyDrive_ owned by my user that has been created (/media/MyDrive without the trailing underscore is owned by root). It's when that point has been created, that the drive can no longer be accessed by another user.

So now it's no longer a real problem for me, since the other user was just optionnal in my setup. But it would be nice to know how to get over it when switching between users. Should I unmount external drives any time I log out ?

Edit2: I don't find the webpage, but I have read about a storage user group, can it be related to that ?

  • 1
    What are you using to handle your automounting? Your DE? A udev rule/helper? – jasonwryan Jan 12 '13 at 22:00
  • I don't know. I'm gonna search since I don't know neither what is a DE or a udev rule. – Stephane Rolland Jan 12 '13 at 22:02
  • What filesystem is on the drive? – Ignacio Vazquez-Abrams Jan 12 '13 at 22:05
  • @IgnacioVazquez-Abrams this usb drive plugged has ntfs filesystem on it. It's all the data I brought with me quitting windows. – Stephane Rolland Jan 12 '13 at 22:08
  • 1
    If you want it available to all users, you will need an entry in your /etc/fstab with the users option. – jasonwryan Jan 12 '13 at 23:04

this is because the partitions were already mounted by another user.

the solution is simply to unmount partition for the other user, then everything is okay.

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.