LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-03-2009, 11:04 AM   #1
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Rep: Reputation: 15
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.
Old 12-03-2009, 11:17 AM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
First check the directory permissions. May be you don't have the permissions to extract on those directories.

to check
Code:
$ls -l
If you don't have the write permission, modify using "Chmod".
Code:
$chmod 777 directoryname
If you are unable change the directory permissions, then run as root.
 
1 members found this post helpful.
Old 12-03-2009, 11:24 AM   #3
svinoba
Member
 
Registered: Nov 2007
Distribution: Debian, Ubuntu MATE/LXQt, Slackware
Posts: 33

Rep: Reputation: 20
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/'

Last edited by svinoba; 12-03-2009 at 11:29 AM.
 
Old 12-04-2009, 10:08 AM   #4
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
acme@acme-laptop:~$ ls

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.
 
Old 12-04-2009, 10:15 AM   #5
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
you are trying to access the folder, which you don't have write permissions.

/var is Readonly for you.
only root can modify that.

that's why you are unable to extract in that folder.
 
1 members found this post helpful.
Old 12-04-2009, 10:24 AM   #6
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
open your terminal

check this

Code:
$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
Code:
$su
password:
#chmod 777 /var/www
or
Code:
su -c 'tar zxvf drupal 5.2.tar.gz -C /var/www'
 
1 members found this post helpful.
Old 12-05-2009, 03:35 AM   #7
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
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.

acme@acme-laptop:~$ cd /

acme@acme-laptop:/$ ls -ld var

drwxr-xr-x 16 root root 4096 2009-12-03 11:24 var

acme@acme-laptop:/$ su

Password:

su: Authentication failure

acme@acme-laptop:/$ sudo

usage: sudo -h | -K | -k | -L | -l | -V | -v

usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]

{-i | -s | <command>}

usage: sudo -e [-S] [-p prompt] [-u username|#uid] file ...

acme@acme-laptop:/$
 
Old 12-05-2009, 05:06 AM   #8
Fred Caro
Senior Member
 
Registered: May 2007
Posts: 1,007

Rep: Reputation: 167Reputation: 167
tar ball extraction

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.
 
Old 12-05-2009, 06:05 AM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 15.0
Posts: 8,233
Blog Entries: 61

Rep: Reputation: Disabled
There is no root account on Ubuntu, so using su won't work. You need to use sudo:
Code:
sudo -c 'tar zxvf drupal 5.2.tar.gz -C /var/www'
Then enter your own password.
 
Old 12-05-2009, 08:06 AM   #10
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
Again this is what I get

acme@acme-laptop:~$ sudo -c 'tar zxvf drupal 5.2.tar.gz -C /var/www'

sudo: illegal option `-c'

usage: sudo -h | -K | -k | -L | -l | -V | -v

usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]

{-i | -s | <command>}

usage: sudo -e [-S] [-p prompt] [-u username|#uid] file ...

acme@acme-laptop:~$


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.

Last edited by ex-para; 12-05-2009 at 08:07 AM.
 
Old 12-05-2009, 08:29 AM   #11
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
if you are using file-roller , follow this

Code:
$sudo file-roller
now open the .gz file and extract to /var/www in GUI mode ..


gud luck
 
1 members found this post helpful.
Old 12-05-2009, 09:54 AM   #12
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
Did it and Archive Manager came up but what do I do with it and I am sorry but I know nothing of file roller.
 
Old 12-05-2009, 10:01 AM   #13
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
file-roller -> open -> go the location where drupal5.2.tar.gz -> open it.

click on extract -> select location as /var/www ... -> extract it.
 
1 members found this post helpful.
Old 12-05-2009, 12:20 PM   #14
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
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.
 
Old 12-05-2009, 07:26 PM   #15
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
file roller is archive manager for ubuntu 9.04
 
1 members found this post helpful.
  


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
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
Recovery from tar backup error occurred "error exist delayed from previous errr" rakesh_sni Linux - Software 2 08-29-2009 06:56 AM
Extracting particular files on a tar from a tape Berris.Oliver Linux - Newbie 2 04-16-2009 03:04 AM
extracting tar.gzip files drmjh Linux - Newbie 6 08-15-2007 02:30 AM
extracting tar.bz2.gz files crank Linux - Newbie 5 04-18-2004 11:33 PM

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

All times are GMT -5. The time now is 04:48 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