Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cdrom access for non-root user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Fri Sep 10, 2004 10:24 pm    Post subject: cdrom access for non-root user Reply with quote

Hey all,
I was wondering if anyone could tell me how exactly i can change the permission access for my non-root user so that it can gain access to the cdrom and its contents. Is there something i have to change in /etc/fstab or anything?
Thanks a lot.
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Fri Sep 10, 2004 10:36 pm    Post subject: Reply with quote

You can add user to your fstab
Code:

/dev/scd0               /mnt/cdrom      auto            noauto,user,unhide         0 0

or your user to /etc/group
Code:

cdrom::19:username

or both
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
czo
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 107
Location: Denmark

PostPosted: Fri Sep 10, 2004 10:39 pm    Post subject: Reply with quote

in /etc/fstab

You the line contains you cd-rom drive you have to set user as a "option" .

/dev/hdc /mnt/cdrom iso9660 noauto,user,unhide,ro 0 0

this is the setting for my cdrom drive... can this help you??
Back to top
View user's profile Send private message
czo
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 107
Location: Denmark

PostPosted: Fri Sep 10, 2004 10:41 pm    Post subject: Reply with quote

geniux wrote:
You can add user to your fstab
Code:

/dev/scd0               /mnt/cdrom      auto            noauto,user,unhide         0 0

or your user to /etc/group
Code:

cdrom::19:username

or both


HeHe cool, didn't knew that you could do the trick from /etc/group
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Fri Sep 10, 2004 10:43 pm    Post subject: Reply with quote

czo wrote:
geniux wrote:
You can add user to your fstab
Code:

/dev/scd0               /mnt/cdrom      auto            noauto,user,unhide         0 0

or your user to /etc/group
Code:

cdrom::19:username

or both


HeHe cool, didn't knew that you could do the trick from /etc/group

You can get access to many things through /etc/group :wink:
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Sat Sep 11, 2004 2:10 am    Post subject: Reply with quote

Hmm...

Okay, i've tried changing both files. This is exactly what i have in fstab:
Code:
/dev/cdroms/cdrom0     /mnt/cdrom     iso9660     ro,noauto,user,unhide  0 0

and this is exactly what i have in /etc/group:
Code:
cdrom::19:<user>

where <user> is my actual non-root user name. Unfortunately, i still can't seem to access my cd drive from the non-root user. Any ideas? :(
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Sat Sep 11, 2004 9:24 am    Post subject: Reply with quote

But you can do the command
mount /mnt/cdrom (or whereever your cdrom are mounted)
dont you?
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Sat Sep 11, 2004 1:39 pm    Post subject: Reply with quote

It says only the root user can mount stuff, when i try to mount cdrom in my normal user session. Is this something i have to change in order to see my cd with non-root users?
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Sat Sep 11, 2004 1:42 pm    Post subject: Reply with quote

Try changing your /mnt/cdrom to users
Code:

chgrp users /mnt/cdrom

That would give the users group access to the /cdrom directory.
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Sat Sep 11, 2004 3:27 pm    Post subject: Reply with quote

Okay, so I typed the above line:
Code:
chgrp users /mnt/cdrom

but i'm still denied access to it in my non-root user.:cry:

Incidentally, for some reason as ROOT user, if i put in a music cd i can see and play the songs off XMMS, but all i see in Nautilus is an empty /mnt/cdrom folder. Doing the same thing as normal user, i see no music files when i use XMMS, and i'm denied access to the folder completely in nautilus.

This stubborn cdrom....
Back to top
View user's profile Send private message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Sat Sep 11, 2004 3:32 pm    Post subject: Reply with quote

Hmm...i don't know if this has anything to do with it, but whenever i enter the terminal for my normal user, i get three lines of
Code:
mount: only root can do that

before the command prompt line. I don't know where it's coming from, and i wonder if it's related to my cd mounting problem?
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Sat Sep 11, 2004 3:39 pm    Post subject: Reply with quote

Ok, try
Code:

chmod 770 /dev/hdc

(thats if your cd are /dev/hdc), if that doesn't help, try
Code:

chown username /mnt/cdrom

_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
T-O7
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 94
Location: Canada

PostPosted: Sat Sep 11, 2004 4:31 pm    Post subject: Reply with quote

I tried the chmod code and it still didn't work, so then I tried the chown code, and it finally worked!!! Thanks a lot, geniux, for all your help! :D
Now, i wonder why nautilus doesn't show the cd's music files....that's still a little strange. But thanks again!
Back to top
View user's profile Send private message
geniux
Veteran
Veteran


Joined: 19 Feb 2004
Posts: 1400
Location: /home

PostPosted: Sat Sep 11, 2004 4:33 pm    Post subject: Reply with quote

I think that nautilus only shows mounted data-files, and not audio-files. I'm not sure but it looks like it, when I had gnome nautilus didn't show my audio's.

Great it worked out
_________________
AMD Athlon64 X2 4200+ AM2
MSI K9N SLI Platinum, Enermax Liberty 500W
1GB RAM Crucial DDR2 667MHz, MSI nVidia 7600GS 256MB
400GB + 250GB Samsung SATAII HDD
Gentoo - BeyondSources 2.6.19-20
Back to top
View user's profile Send private message
czo
Tux's lil' helper
Tux's lil' helper


Joined: 01 Sep 2004
Posts: 107
Location: Denmark

PostPosted: Fri Oct 08, 2004 10:23 pm    Post subject: Reply with quote

if you use gnome emerge devmagic or magicdev.. don't remember the name
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum