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
190 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Let’s list some of the technologies that enable smooth teleworking. 
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

17 Experts available now in Live!

Get 1:1 Help Now