-   Linux - Newbie (
-   -   Pulling from CDROM (

MikeeX 03-13-2002 10:24 AM

Pulling from CDROM
Since I'm a newbie, there has to be a differnet way of going about this.

I burnt a CD here at work with alot of .tar.gz files, cause im on dial up at home. Now when i enter gnome i get to term and i type

mount /dev/cdrom

of course I have to do this with root (until i figure out how to use sudo :P )

now when i browse the CD copy files to a dir in my /home

cp filename.tar.gz /home/MikeeX/downloads

now when going to my home dir logged on as myself, I don't have permission to extract these .tar.gz files, and I think its because I cp them as root .. im not really sure .. can anyone give me any tips or ideas on how to do this so I don't have to switch around users so much to just extract a darn file :)


Thymox 03-13-2002 10:35 AM

chown username:username filename
Has to be done as root, though.
Alternatively, if you intend on extracting the file anyway, why don't you mount the cdrom as root (it's annoying, isn't it) and tar -zxpvf the file directly from the CD?

cd ~/files/progs
tar -zxpvf /mnt/cdrom/tar_files/something.tar.gz

MikeeX 03-13-2002 11:06 AM

ahhh ok, i see what you saying about being in the destination folder and just extracting from the CD to there, thats really cool! I'll give that a try when i get home .. also what do you mean by this?

chown username:username filename

Thanks again!

Thymox 03-13-2002 11:13 AM

When you copy a file from one place to another as root, by default (for some reason) the new file is then owned by root. If you did this by su rooting, then you won't be able to access the file as a normal user. If you need to copy the file as root but access it as the normal user, then once you've copied it to its destination directory, you should type the following:

chown thymox:thymox filename (obviously changing thymox to whatever user you want to access it). This command will only work on files currently owned, so:

If user A ownes file Q, then user A can chown Q. User B cannot chown Q until user A has allowed them to do so. Root, however, can chown any file.

MikeeX 03-13-2002 11:34 AM

awesome! i totatlly understand now .. thank you so much for your time!

linuxcool 03-13-2002 11:25 PM

To allow a user to mount the cdrom drive, add the word user to the cdrom entry of the /etc/fstab file. It would look something like this:

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

MikeeX 03-14-2002 09:24 AM

linuxcool, thanks thats a pretty cool trick. I will have to remember that.

linuxcool 03-14-2002 07:10 PM

You're welcome. :)

LinuzRulz 03-14-2002 07:18 PM

try this
i got the same thing accomplished by going into terminal as SU and typing

chmod a+rwx /mnt/cdrom
now I can mount it as user

All times are GMT -5. The time now is 12:35 PM.