LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 11: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, 11:35 AM   #2
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
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, 12:06 PM   #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, 12:13 PM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
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, 12:34 PM   #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-14-2002, 12:25 AM   #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, 10: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, 08:10 PM   #8
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You're welcome.
 
Old 03-14-2002, 08: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:39 PM
I'm pulling my hair out here.. Emanon247 Linux - Newbie 3 07-20-2004 02:17 PM
aaaaaahhhhhhh im pulling my hair out!! BajaNick General 14 08-26-2003 04:06 PM
Pulling out hair again... Ludacris Linux - Networking 8 12-22-2002 02:21 AM
URghh!!! pulling out hair! Ůmegaflops Linux - Newbie 4 05-28-2002 05:26 AM


All times are GMT -5. The time now is 02:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration