LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2002, 10:24 AM   #1
MikeeX
Member
 
Registered: Mar 2002
Distribution: Ubuntu 6.10
Posts: 165

Rep: Reputation: 30
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

Thanks!!!!!
 
Old 03-13-2002, 10:35 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
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
 
Old 03-13-2002, 11:06 AM   #3
MikeeX
Member
 
Registered: Mar 2002
Distribution: Ubuntu 6.10
Posts: 165

Original Poster
Rep: Reputation: 30
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!
 
Old 03-13-2002, 11:13 AM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
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.
 
Old 03-13-2002, 11:34 AM   #5
MikeeX
Member
 
Registered: Mar 2002
Distribution: Ubuntu 6.10
Posts: 165

Original Poster
Rep: Reputation: 30
awesome! i totatlly understand now .. thank you so much for your time!
 
Old 03-13-2002, 11:25 PM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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
 
Old 03-14-2002, 09:24 AM   #7
MikeeX
Member
 
Registered: Mar 2002
Distribution: Ubuntu 6.10
Posts: 165

Original Poster
Rep: Reputation: 30
linuxcool, thanks thats a pretty cool trick. I will have to remember that.
 
Old 03-14-2002, 07:10 PM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You're welcome.
 
Old 03-14-2002, 07:18 PM   #9
LinuzRulz
Member
 
Registered: Jan 2002
Location: Confederate States of America
Distribution: Mandrake 9.0
Posts: 197

Rep: Reputation: 31
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling my hair out with Ath0 FXRS Linux - Networking 3 09-23-2004 05:39 PM
I'm pulling my hair out here.. Emanon247 Linux - Newbie 3 07-20-2004 01:17 PM
aaaaaahhhhhhh im pulling my hair out!! BajaNick General 14 08-26-2003 03:06 PM
Pulling out hair again... Ludacris Linux - Networking 8 12-22-2002 01:21 AM
URghh!!! pulling out hair! Ůmegaflops Linux - Newbie 4 05-28-2002 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration