?
Solved

Transferring files while preserving permissions

Posted on 1998-04-28
8
Medium Priority
?
448 Views
Last Modified: 2010-04-21
Hi.

I have lots of files on one server and need to transfer them to another while preserving all permissions.
I tried tarring them up with :- tar -cfvp file.tar my_folder and it worked a little.. some of the files had permissions of 777 but TAR did not preserve them.. How do I get around this?
0
Comment
Question by:missy041598
[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
  • 4
8 Comments
 
LVL 4

Expert Comment

by:jos010697
ID: 2006480
This is what my man page (AIX 4.2) says about tar's -p flag:

-p      Says to restore fields to their original modes, ignoring the present
umask. The setuid, setgid, and tacky bit permissions are also restored
to the user with root user authority.

Is this what you're looking for?

kind regards,

Jos aka jos@and.nl

0
 

Author Comment

by:missy041598
ID: 2006481
Yes, I understand this but I did have the "p" in the above example I have included
and it still didn't work.
0
 
LVL 4

Expert Comment

by:jos010697
ID: 2006482
I guess I included too much from the man page; just the last line was important here:
were you logged in as root while transfering the data? If not, check (and unset)
your umask ...

kind regards,

Jos aka jos@and.nl
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:missy041598
ID: 2006483
Hi.

Yes I was logged on as root. How do I unset my unmask? Sorry im not very experienced with this. Do I need to unset my unmask when tarring or when untarring?

Thanks for your help. Looks like we are getting somewhere, hopefully I will be right soon.

0
 
LVL 4

Expert Comment

by:jos010697
ID: 2006484
umask is a command (usage: 'umask 000' to unset all mask bits), but I think I've
got it now after rereading your question: you have to use the -p flag when
 _extracting_ the files, not when _creating_ the archive

(I guess I need glasses or something ;-)

kind regards,

Jos aka jos@and.nl
0
 

Author Comment

by:missy041598
ID: 2006485
Hi..

Thanks soooo much! You have really helped. Answer the question and i'll give you your much deserved points.

Thanks again.
0
 
LVL 4

Accepted Solution

by:
jos010697 earned 200 total points
ID: 2006486
Ok, here goes ... thanks for the points

Jos aka jos@and.nl
0
 

Author Comment

by:missy041598
ID: 2006487
Thanks again.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

650 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