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
204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
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…

724 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