Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can ftp keep original file permissions

Status
Not open for further replies.

andypor

Technical User
May 2, 2001
4
GB
Hi all,

I have written a script to ftp the contents of a directory from one sun box to another as a backup of sorts! problem being the files permissions are not retained...

Would appreciate any ideas!

Regards Andy
 
Andy, have a read through this thread on the General Unix Discussion forum ... it may give you some ideas.

Thread80-75666

Greg.
 
Greg,

Thanks for the reply, I had already searched the faqs and found this question, the problem I have is that I am ftping the conf directory from a solaris box running firewall 1 s'ware and wanted to keep all of the file permissions the same as the originals with setuids etc... therefore setting the umask would not help...

Thanks for the quick reply..

Andy
 
I don't know about using ftp for this, but if you can use cpio, there are enough options to keep file permissions and mod times etc which might do what you want.
If you mount a directory from one machine onto the other you can then copy from one to the other. Whether this will compromise security with one being the firewall is something you would need to look at.
 
why not you tar the file or files and do ftp and then
untar at destination.

sorry little more work but may solve your problem.

hope some help
Neeraj
 
why not you tar the file or files and do ftp and then
untar at destination.

sorry little more work but may solve your problem.

hope some help
Neeraj
 
Thanks for you help, It seems the ftpd can pick up a preset umask but cannot retain the original permissions of all files, so I have now tared up the directory first, compressed the file and then ftp'd..

Thank you all for your input
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top