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!!!!! |
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 |
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! |
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. |
awesome! i totatlly understand now .. thank you so much for your time!
|
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 |
linuxcool, thanks thats a pretty cool trick. I will have to remember that.
|
You're welcome. :)
|
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 05:46 PM. |