I get an error occurred while extracting tar.gz files
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.
I get an error occurred while extracting tar.gz files
I get an error occurred while extracting files with drupal 5.2.tar.gz. It will extract on the desktop but not into the folder I need it in. I can drag it in but again but no good tells me I need permission.
Any ideas please.
Last edited by ex-para; 12-03-2009 at 11:06 AM.
Reason: Spelling
Click here to see the post LQ members have rated as the most helpful post in this thread.
To extract to a particular folder you need permission. Better extract as root if you want to extract into a directory not owned by user.
Code:
su -c 'tar zxvf <file-name>.tar.gz -C /path/to/target/directory'
Note its small letter 'c' after su and capital letter 'C' before mentioning target directory. Also, there is single inverted commas covering tar command. As an example,
Code:
su -c 'tar zxvf drupal-5.2.tar.gz -C /usr/local/src/'
Desktop Documents Examples Music Pictures Public Templates Videos
acme@acme-laptop:~$
This is the first one and I did not understand the others.
Thanks for the replies, I tried the codes but to be honest I don't know what I am looking at. What I need to do is extract the files from drupal-5.2.tar.gz and have the permission to put them in var/www/
is it possible to have a code to do this.
$cd /
$ls -ld var
drwxr-xr-x 15 root root 4096 2009-08-20 15:44 var
output saying that, drwxr-xr-x ..............
d = var is a directory
rwx = root is a owner, he has read, write, executable permissions.
r-x = group has read and executable permissons
r-x = finally you has read and executable permissions.
so that is the reason you are unable to write /var and its subdirectory.
if you want to extract in "/var/www "
then do this
Thanks again, I just seem to have nothing but problems, when I use su you will see Authentication failure
so I am unable to get past that. When I use sudo again see what I get and unable to understand it. I have of course tried all possibilities with the codes you sent without success. Would there be any more solutions please.
First QU is why do you want to extract to 'var'? The reason why it is protected by root permissions is that it is generally used by the system to update, or keep track of things, such as, printer spooling. Usually a tar file is extracted to your home file, i.e., if it has landed on your desktop, just change the path to your home. However, I think that is the dafault place if you are the only user.
Fred Caro, it has to go in www which is in var and I have to have permission to extract it in www it is a server setup. The first attempt I had I was able to extract drupal 5.2 into www but I could not configure the drupal database as I had no password for mysgl and I got it so messed up I had to re-install but now I have the mysql password I cant extract drupal to www.
I have just started to figure out what file-roller is and where it is, of course it was staring me in the face but I could not see it. I have been to point where I had to enter the information but did not know it. I will give it go when I am sure I am doing which is my main problem, ignorance.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.