Solved

Errors when ex tracing tar file from other box

Posted on 2006-11-19
5
240 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fixing Non-Standard characters in text 8 90
nagios 1 21
Reset Root Password on CentOS 6 4 43
Penetration Testing home based work 3 41
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
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 …
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.:

932 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

12 Experts available now in Live!

Get 1:1 Help Now