Solved

Errors when ex tracing tar file from other box

Posted on 2006-11-19
5
239 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
Comment Utility
What users are you running the tar command as?  root?
0
 
LVL 16

Author Comment

by:hankknight
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now