#2758 rsync for fedorahosted would really help
Closed: Fixed None Opened 13 years ago by mcepl.

= problem =
Take a look at https://fedorahosted.org/released/bugzilla-triage-scripts/ with every release I have to push all those files with scp (which apparently cannot do "write only files changed") again and again. That's 6.2MB now.

= analysis =
Moreover, some files could be removed (not all old versions, I support Firefox 3.6.* with some older versions of my scripts as well) and some (example.rdf) are there by mistake.

= enhancement recommendation =
Allow rsync for those people who have write access to fedorahosted.org release/ directories.


Are you sure it's not already available?

rsync fedorahosted.org::releases/b/u/bugzilla-triage-scripts/

{{{
bradford:~ $ rsync -av --delete Dokumenty/website/fedorahosted/ mcepl@fedorahosted.org::releases/b/u/bugzilla-triage-scripts/
sending incremental file list
ERROR: module is read only
rsync error: syntax or usage error (code 1) at main.c(866) [receiver=3.0.6]
rsync: connection unexpectedly closed (5 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.8]
bradford:~ $ rsync -av --delete Dokumenty/website/fedorahosted/ mcepl@fedorahosted.org:/releases/b/u/bugzilla-triage-scripts/
Invalid command rsync --server -vlogDtpre.iLsf --delete . /releases/b/u/bugzilla-triage-scripts/
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.8]
bradford:~ $
}}}

Yeah, thats read only. :)

We will need to adjust the shell that people get to allow rsync...

This script is in:
./configs/system/run-git
in puppet.

We would need to add the ability to run rsync and keep it restricted to the hosted space where files should go. Will see if I can find someone interested in this task.

Just to note ... this ticket is still doing pretty well, thank you.

Sorry for the delay. I looked at adding this, but it wasn't easy/clear how to do so.

Adding toshio here to see if he can add it. :)

I know/can figure out how to add rsync to the allowed commands but I'm not sure how to restrict it to only modify files in the allowed directories.

Oops, svnserve is a little different; set umask
run-git.2

Yeah. I'm not sure how important that is. Permissions should prevent them changing other projects or the like right?

What about checking the path and rejecting if it's not in the /srv/web/releases/ tree... like the run_scp does?

Attempt to limit the patch that can be written by rsync
run-git.3

New run-git deployed. Try it and see if it works.

Much better:
{{{
bradford:~ $ rsync -vzrLCptg --delete Dokumenty/website/fedorahosted/ mcepl@fedorahosted.org:bugzilla-triage-scripts
sending incremental file list
./
rsync: failed to set times on "/srv/web/releases/b/u/bugzilla-triage-scripts/.": Operation not permitted (1)
Config_mozilla.json
bugzilla-triage-latest-FF3.xpi
bugzilla-triage-latest.xpi
icon.png
update.rdf

sent 452420 bytes received 110 bytes 36202.40 bytes/sec
total size is 10282801 speedup is 22.72
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1052) [sender=3.0.8]
bradford:~ $
}}}
Couldn't we get times setting as well, please? Rsync uses it for synchronization, doesn't it?

The problem here is that you are not the owner of the directory.
We can't really make all group members owner of their projects upload dir...

Can you run with -O ? That should remove the error message and work fine...

Login to comment on this ticket.

Metadata