Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 ?

share|improve this question
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

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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