SUMMARY-taring between solaris and linux

From: Dilip M <>
Date: Mon Jun 16 2003 - 01:14:59 EDT
Thanks to 

Andy Malato  
John Cronin
Andy Malato  
Florendo, Jay Jay  
Shaw, Matthew (Thanks for your precios time to write a very good notes on this
issue!!)) was very educative ....
and *. all....:))

Question was :

Small query from my side ...
You have mentioned one of cpio option..
find / -xdev -print | cpio -ocv -O /export/home/OS.cpio

Do this maintain permissions ??? Consider a example

I have a two machine One is sun and other is linux.
The linux's machine /export/<directory> is shared across the n/w and i can
/export/<directory> of linux from any other machine /net direcory.

Now i need to copy a directory which is on Solaris to linux box with same
Permissions , block size...

On solaris box the permissions are as follows:

ls -l /export/<directory>
drwxrwxr-x   2 nobody   nobody       512 Feb 12  2002 <directory1>
drwxrwxr-x   3 nobody   nobody       512 Apr  8  2002 <directory2>

Now I need to copy this /export/<directory>/* to /net/export/<directory>

Here /net/export/<directory> is a linux box!!

I tried with cpio and tar -p option alo...everything went fine...but
permissions was
changed !! :((

Also spent a day on google and did
cd /export/<directory> 

tar cf - . | (cd /net/export/<directory> && tar xf -)

The copied files permissionsAll went fine except the prmissions :((
It was not gettig retained to 'nobody',but was getting changed to mine eff

How could i retain the permissions too....

kindly advice :)
1)First the linux box was NOT shared with 'root_squash' option which is default
I changed it to 'no_root_squash'

2)Tried to do  tar cpf - . | (cd /net/export/<directory> && tar xpf -) as a normal
user Did'nt worked!! ;((
Again did as a root user...everything went fine except some of the symbolic linked
files were missed out :((

3) finally did
cd /export/<sun-machine-directory>
find . | (cpio -Pvo -H crc) | (cd /net/export/<directory>; cpio -Pdmi -H crc)

Everything went fine.
Only thing is the nobody UID on sun box is 60001 and that of linux is 99
It was retained in terms if UID.That is 60001

Lastly i  did
find <starting-directory> -uid 60001 -exec chown 99 \{\} \;
chown -R nobody:nobody Rel-test will do fine :))

Thanks to all...for taking time to helping me..


--------End of message ------------

Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
sunmanagers mailing list
Received on Mon Jun 16 01:17:59 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:14 EST