LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   DamnSmallLinux (https://www.linuxquestions.org/questions/damnsmalllinux-42/)
-   -   Cannot find CD in DSL (https://www.linuxquestions.org/questions/damnsmalllinux-42/cannot-find-cd-in-dsl-442916/)

Adamant1988 05-08-2006 06:13 PM

Cannot find CD in DSL
 
I installed DSL to my old laptops hard drive, and I'd like to take a picture off of a CD but it's telling me I don't ahve access to the files...
I did 'su root' but it didn't give me access

b0uncer 05-09-2006 10:58 AM

if you wish to get root rights, you just do

Code:

su
without any specific username (well, I'm not sure if it matters, actually). if you wish to run a command as root, instead, just run

Code:

su commandname
and put the command you want to run in place of commandname in the above example. after you run that command, "su" asks for your own password to run the command. an example:

Code:

su mount /dev/cdrom /mnt/cdrom
Password:

would mount a cd, after you gave your password, if you had a directory /mnt/cdrom created and the cd device file was /dev/cdrom.

if you mount some device (a cdrom) as root, you probably can only access it as root, because it's mounted with root privileges only. an option is to change the permissions so normal users can use the device too, or then mount as a normal user. both need you to alter some configurations, maybe; either add some user to a group that has access to the mount command (usually the group is called mount) or then edit the fstab file (where the mountable filesystems are configured) and add there usermask.

To add the usermask: open /etc/fstab as root, locate the line where it says something about your cdrom (the line probably starts with /dev/cdrom or something similar) and at the 4th column, where the options are, add a dot and "umask=0222"; an example: if the line would be

/dev/cdrom /mnt/cdrom auto defaults 0 0

then you would change it to this:

/dev/cdrom /mnt/cdrom auto defaults,umask=0222 0 0

and it should work. another way around is to try and add your user to the mount-group:

Code:

sudo useradd -G mount
and then re-try to mount the cdrom:

Code:

mount /mnt/cdrom
(if your cdrom is mounted into some other place than /mnt/cdrom, change that accordingly)


All times are GMT -5. The time now is 01:32 AM.