Operating System - HP-UX
1848620 Members
2031 Online
104033 Solutions
New Discussion

Re: tar permission problems

 
Dan Copeland
Regular Advisor

tar permission problems

I am copying a set of files( through tar) from one directory to another through applmgr (user ) and it gives 777 permission on the destination server. If I copy it through root then it retains the permissions . Please advise.
6 REPLIES 6
U.SivaKumar_2
Honored Contributor

Re: tar permission problems

hi,
what is the umask set in the servers ?.
#umask
regards,
U.SivaKumar
Innovations are made when conventions are broken
Dan Copeland
Regular Advisor

Re: tar permission problems

022. It is working from the destination to the source not in the reverse direction.
U.SivaKumar_2
Honored Contributor

Re: tar permission problems

hi,
use -p options with tar command to preserve the
permissions.

regards,
U.SivaKumar
Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: tar permission problems

hi,
then what is the umask of source ?
what is the umask of destination ?.
try using -p options in tar for both ways.

regards,
U.SivaKumar
Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: tar permission problems

hi,
another workaround.
In the server , where permissions are changing
after restore.
#umask
note down the umask
#umask 0
restore now.

regards,
U.SivaKumar
Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: tar permission problems

and dont forget to reset the umask value to original noted value.

regards,
U.SivaKumar
Innovations are made when conventions are broken