cancel
Showing results for 
Search instead for 
Did you mean: 

rsync issue

Procnus
Frequent Advisor

rsync issue

Hi all,

I have rsync utility 3.0.6 installed on HP-UX v11.11.

I tried to run rsync over ssh and using public key. I do not want to use super user in the remote system (HP-UX v11.11 and rsync 3.0.6).

Both server configuration and system are identical, apart from host name and IP address.

My question is how I can rsync files to remote system and keep file permission, owner, group without root?

I tried "fake-user" parameter, but got following error,

rsync: extended attributes are not supported on this client
rsync error: syntax or usage error (code 1) at main.c(1422) [client=3.0.6]

Would someone have any ideas? Thanks in advance.

Eric
7 REPLIES
Kapil Jha
Honored Contributor

Re: rsync issue

>>My question is how I can rsync files to remote system and keep file permission, owner, group without root?

Do you want to change the permission on destination machine without root.

not able to understand ur requirement.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Procnus
Frequent Advisor

Re: rsync issue

Hi Kapil,

Both servers have same OS and configuration, including /etc/passwd and /etc/group.

I would like to keep file owner, group and permission same on remote server same as source server without using super user account.

thanks,
Eric
Steven Schweda
Honored Contributor

Re: rsync issue

> I would like to keep file owner, group and
> permission same on remote server same as
> source server without using super user
> account.

For a variety of reasons, a normal user can't
take or give away the ownership of a file.
Some entity with special privileges can do
it, such as a privileged user ("root") or a
program which has special privileges ("sudo",
or something else with an suid permission
bit set, for example).

> I do not want to use super user in the
> remote system [...]

Why not? (The job's too easy that way?)
Kapil Jha
Honored Contributor

Re: rsync issue

Why dont you put the files in a separate directory and restore when needed, anyways if you change the user of the file in destination they would not be used anyways.

I suppose you doing it for redundancy purpose.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
WayneHP
Frequent Advisor

Re: rsync issue

As log as you are moving files that the ssh users you are using to rsync with has permissions for the files on the source and the directory on the target it will work.

Otherwise you need to use root or root permissions one way or the other.

UNIX 101

Are you using file ACLs?

lsacl /source

http://docs.hp.com/en/B2355-90672/ch12s06.html
Procnus
Frequent Advisor

Re: rsync issue

Hi all,

Thanks for all your reply.

The remote server is DR server. So I would like to keep it same as production server.

Root and public key are working fine in this case. Due to security audit issue, I can't use root and public key to replicate data.

However, I would like to keep file owner, group and permission on DR server same as production server. Is it possible to achieve this?

kind regards,
Eric
Procnus
Frequent Advisor

Re: rsync issue

Why dont you put the files in a separate directory and restore when needed, anyways if you change the user of the file in destination they would not be used anyways.

==> More than 1.5 million files need to be replicated. It's difficult to control file owner, group, permission for each file.

Are you using file ACLs?
==> It's no ACLs in place in the system.

kind regards,
Eruc