Solved

Errors when ex tracing tar file from other box

Posted on 2006-11-19
5
241 Views
Last Modified: 2010-04-20
Hello,

I have two Linux boxes that are configured EXACTLY the same (one is for development and one is for production)

I got things working just the way I wanted on my DEV box, then did this:

       tar cf projectname.tar /home/projectname/public_html/project

Then on my PROD box I did this:

       wget http://projectname.dev.mysite.com/projectname.tar
       tar xf projectname.tar

The wget works fine BUT tar xf gives me dozens of errors like this:
        tar: project/images/clear.gif: Cannot open: No such file or directory
And finally:
        tar: Error exit delayed from previous errors

How can I do this?  It should be simple and easy!

Thanks!

0
Comment
Question by:hankknight
5 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 250 total points
ID: 17976869
What users are you running the tar command as?  root?
0
 
LVL 16

Author Comment

by:hankknight
ID: 17978760
No, I created them as user "dev" and I am trying to extract it as user "prod"

The reason that I did not SU (as root) is because I was worried that then when I log in as "prod" I would not be able to make updates to the files.

Is there a way I can specifically change ALL permissions from "dev" to "prod"?  Would that fix it?  Thanks.
0
 
LVL 5

Assisted Solution

by:ircpamanager
ircpamanager earned 200 total points
ID: 17980622
you can change the permissions of tar file by typing as root in terminal window:
chown prod.prod projectname.tar
*notice the owner name is prod and group name(second one) is prod, this assuming that there is a user name prod and group named prod.
*is project a directory?If so what are the permissions of the directory and subdirectorys?
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 50 total points
ID: 17981537
It seems that you have no permision to write to the directory.
also try to ls -al files at the both ends to see if the files ar e the same size.

0
 
LVL 48

Accepted Solution

by:
Tintin earned 250 total points
ID: 17982147
The error will occur from prod not having permissions to read/set permissions on the files it is extracting.

Either use the same user to create/extract the tar file, or use root.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question