Re: rsync and file ownership
On Thu, 22 Jul 2004, Matthew Dwyer wrote: > Bakken, Luke wrote: > > What I ended up having to do is set CYGWIN=nontsec for my rsync server > > and client before any transfers. If your directories are set to inherit > > permissions then the permissions will be set OK based on the parent > > permissions. > > > > For example: > > > > $ CYGWIN=nontsec rsync -rtvz server::share /c/foo > > > > You can set that variable in your cygrunsrv setup for the rsync daemon. > > Thanks, I'd already read that in this group and it helped a lot! :) > > The main problem remaining is just that its creating permissions that > didn't exist on the files prior to the copy. eg. If I do a network > copy (its my test environment, the real thing will be across the > internet) the files have the same permissions as they started with. If > I rsync them, Admin and Everyone only get read access. Thats what I > need to change. I'm running rsync over ssh from dos bat files. Its not > going to be interactive. I don't think I can chown or chmod the files > once copied (can that be done over ssh non-interactively?). It can, pretty easily. assuming pubkey withought passphrase (otherwise maybe have a read on expect) ssh [EMAIL PROTECTED] chmod - /path/to/files (anything after the [EMAIL PROTECTED] part is treated as a command to be executed non interactively on the remote host as the specified user, see man ssh for details) Vince > > Matt. > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rsync and file ownership
Bakken, Luke wrote: > What I ended up having to do is set CYGWIN=nontsec for my rsync server and client before any transfers. If your directories are set to inherit permissions then the permissions will be set OK based on the parent permissions. For example: $ CYGWIN=nontsec rsync -rtvz server::share /c/foo You can set that variable in your cygrunsrv setup for the rsync daemon. Thanks, I'd already read that in this group and it helped a lot! :) The main problem remaining is just that its creating permissions that didn't exist on the files prior to the copy. eg. If I do a network copy (its my test environment, the real thing will be across the internet) the files have the same permissions as they started with. If I rsync them, Admin and Everyone only get read access. Thats what I need to change. I'm running rsync over ssh from dos bat files. Its not going to be interactive. I don't think I can chown or chmod the files once copied (can that be done over ssh non-interactively?). Matt. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: rsync and file ownership
> On Wed, 21 Jul 2004 17:02:35 +1200, Matthew Dwyer wrote: > > I've been struggling with rsync over ssh for a month. I'm > syncing files > > between windows boxes and I have rsync working except that > its setting > > read only to the groups Administrators and Everyone. > > > > Is there any way I can stop rsync or ssh setting > permissions/ownership > > that wasn't already present in the originating files? I've > tried rsync > > -a... but thats not achieving what I want. > > > > Matt. What I ended up having to do is set CYGWIN=nontsec for my rsync server and client before any transfers. If your directories are set to inherit permissions then the permissions will be set OK based on the parent permissions. For example: $ CYGWIN=nontsec rsync -rtvz server::share /c/foo You can set that variable in your cygrunsrv setup for the rsync daemon. Luke -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: rsync and file ownership
Don't use the -a option if you don't want to preserve the permissions. >From the man page: -a, --archive archive mode, equivalent to -rlptgoD And now a breakdown of each option from the man page (you can use what you need then) -r, --recursive recurse into directories -l, --links copy symlinks as symlinks -p, --perms preserve permissions -t, --times preserve times -g, --group preserve group -o, --owner preserve owner (root only) -D, --devices preserve devices (root only) HTH. On Wed, 21 Jul 2004 17:02:35 +1200, Matthew Dwyer wrote: > I've been struggling with rsync over ssh for a month. I'm syncing files > between windows boxes and I have rsync working except that its setting > read only to the groups Administrators and Everyone. > > Is there any way I can stop rsync or ssh setting permissions/ownership > that wasn't already present in the originating files? I've tried rsync > -a... but thats not achieving what I want. > > Matt. > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Problem reports: http://cygwin.com/problems.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Robert Pendell [EMAIL PROTECTED] -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
rsync and file ownership
I've been struggling with rsync over ssh for a month. I'm syncing files between windows boxes and I have rsync working except that its setting read only to the groups Administrators and Everyone. Is there any way I can stop rsync or ssh setting permissions/ownership that wasn't already present in the originating files? I've tried rsync -a... but thats not achieving what I want. Matt. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/