You are not logged in.

#1 2013-08-14 08:39:09

kicka
Member
From: Sicily / Italy
Registered: 2012-10-18
Posts: 31

cannot access /media as user

Hi everybody... I have this strange problem after installing archlinux under virtualbox (Host Windows 7). I cannot access /media directory as user, it still continue to say i have no permits. As root np. Is not the first time i install archlinux (though is the first time under virrtualbox), all the rest work flawlessly. I need to access /media because i would like to mount (as shared folder) my second hard drive called "Storage" into it. If i put Storage under home it work, but still i cannot access any directory except home as user, i even cannot cd into...
Maybe i forgot something...

To mount my second hard drive, i put this entry to my fstab:

# Automount Hard Disk
Storage       /home/Virtual-Lab/Storage      vboxsf     defaults 0 0

This is working, but if i do:

Storage       /media/Storage      vboxsf     defaults 0 0

It doesn't.

I never had a problem "accessing" /media as user, of course i cannot write into it as user (except if i do a sudo...).

If i do:

sudo ls -l /media (but it could be any other directory except /home, like /etc, /usr..., etc)    (without sudo it didn't work!)

it says:

drwxr-xr-x 3 root root 4096 14 agu 10.12 Virtual-Lab

what went wrong guys?

Offline

#2 2013-08-14 09:22:36

miroslavkoskar
Member
Registered: 2013-08-13
Posts: 8
Website

Re: cannot access /media as user

Post output of

$ ls -ld /media

inactive, migrated to new user account: <mkoskar> (https://bbs.archlinux.org/profile.php?id=83604)

Offline

#3 2013-08-14 09:23:35

spyrocete
Member
Registered: 2013-08-14
Posts: 4

Re: cannot access /media as user

The reason is your user is not added to the group that allows you to mount drives. You will have to add your user to the group with the following command.
gpasswd -a user group
The group you need is storage so just replace group with storage and user with your user name.Here is the website I used to find this information.
https://wiki.archlinux.org/index.php/Users_and_Groups
On a side not ls does not seem to work with sudo at least I have never got it to work.

Last edited by spyrocete (2013-08-14 09:25:28)

Offline

#4 2013-08-14 13:55:09

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: cannot access /media as user

spyrocete wrote:

The reason is your user is not added to the group that allows you to mount drives. You will have to add your user to the group with the following command.
gpasswd -a user group
The group you need is storage so just replace group with storage and user with your user name.Here is the website I used to find this information.
https://wiki.archlinux.org/index.php/Users_and_Groups
On a side not ls does not seem to work with sudo at least I have never got it to work.

This doesn't make sense. The system itself mounts the drives from fstab, so the user groups have nothing to do with it. Even if it would, groups like "storage" etc. are obsolete and shouldn't be used anymore.

I guess the permissions on the /media directory are simply screwed up. Either way, you shouldn't use /media, it's used by udisks and you are not supposed to mount your own stuff in there. Use /mnt instead.

Offline

#5 2013-08-15 05:22:23

kicka
Member
From: Sicily / Italy
Registered: 2012-10-18
Posts: 31

Re: cannot access /media as user

Thanks everybody for the faster response...

I created another virtual arch, and this time everything works fine...

@65kid

i was allready in the storage group...


I close this topic... (I don't think i have to put it solved in it... if i had to just tell me and i will...)

Offline

Board footer

Powered by FluxBB