Solved

What should I change in remote shell command line in order to save the users groups and permission

Posted on 1998-11-30
4
198 Views
Last Modified: 2013-12-23
I use the following line in order to copy one directory
 to another directory on another machine.

tar cf - .|rsh <ip address>
 '(cd <destination dir>;tar xBvf -)'

the problem is that all fileswere created with  root as owner.
What can I change in this command in order to transmit the dir with all owners permissions and groups
0
Comment
Question by:tzahi
4 Comments
 

Author Comment

by:tzahi
ID: 1582645
Edited text of question
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1582646
tar xpBvf -

unfortunatelly tar options highly depend on the UNIX flavior,
you'va to tell us you UNIX.
0
 
LVL 1

Expert Comment

by:arthurd
ID: 1582647
Try adding the "p" option to tar.  This will preserve the permissions and ownerships.


0
 
LVL 1

Accepted Solution

by:
toTo earned 50 total points
ID: 1582648
first the user id in the 3de field of /etc/passwd must
be the same number on both hosts.

switch from tar to cpio , when used by root, it maintains user
informations

find . -print | cpio -ocB | rsh <ip address>
      '(cd <destination dir>; cpio -icdvB)'

 
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

803 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