Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.