neo
2004-Sep-01 05:19 UTC
Problems of preserving file owership and uid&gid options in rsyncd.conf
Hi, I am trying to transfer some files to a remote rsync server. I have to preserve the ownership of these files in the remote server for future possibility of copying them back. The command I am using is: rsync -Cav /var/log/mp3log server2::var/log/mp3log I have tried to add -o and -g options but still can't reach my purpose. I also remember to add a same user name to the remote rsync server. So what's the problem of my command? Another question is: if I don't specify the root uid and gid in rsync.conf, it seems the rsync on the remote server doesn't has enough privilege to create folds, because it is using the uid 99 which is nobody. However, I can't find these same options as mine in the example script files. So what is the proper way to set the uid and gid options?. Any suggestion is appreciated. Thanks! my rsyncd.conf: uid = root gid = root [var] path = /var comment = /var read only = no list = yes Dong -------------- next part -------------- HTML attachment scrubbed and removed
Tim Conway
2004-Sep-01 18:30 UTC
Problems of preserving file owership and uid&gid options in rsyncd.conf
move your uid and gid into the module. They are not valid as global options.I hope there's something about auth users and a secrets file somewhere in there as well, as wide-open root to your /var is ill-advised. Ding-- Tim Conway Unix System Administration Contractor - IBM Global Services desk:3032734776 conway@us.ibm.com I am trying to transfer some files to a remote rsync server. I have to preserve the ownership of these files in the remote server for future possibility of copying them back. The command I am using is: rsync -Cav /var/log/mp3log server2::var/log/mp3log I have tried to add -o and -g options but still can't reach my purpose. I also remember to add a same user name to the remote rsync server. So what's the problem of my command? Another question is: if I don't specify the root uid and gid in rsync.conf, it seems the rsync on the remote server doesn't has enough privilege to create folds, because it is using the uid 99 which is nobody. However, I can't find these same options as mine in the example script files. So what is the proper way to set the uid and gid options?. Any suggestion is appreciated. Thanks! my rsyncd.conf: uid = root gid = root [var] path = /var comment = /var read only = no list = yes Dong-- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Wayne Davison
2004-Sep-07 18:16 UTC
Problems of preserving file owership and uid&gid options in rsyncd.conf
On Wed, Sep 01, 2004 at 01:18:43AM -0400, neo wrote:> However, I can't find these same options as mine in the example script > files.FYI, the rsyncd.conf manpage lists all the available options.> So what is the proper way to set the uid and gid options?The options as you listed them were fine (assuming that you have a user and a group "root"). You can also try this instead: uid = 0 gid = 0 And don't forget to specify access control, to avoid letting anyone write files into your /var dir. ..wayne..
Wayne Davison
2004-Sep-07 18:18 UTC
Problems of preserving file owership and uid&gid options in rsyncd.conf
On Wed, Sep 01, 2004 at 02:29:30PM -0400, Tim Conway wrote:> move your uid and gid into the module. They are not valid as global > options.Setting the uid and gid in the global context sets the default values for all of the modules. ..wayne..