How to change permissions on a directory without meaning to...
- include/exclude semantics
tim at semantico.com
Tue Oct 7 20:25:36 EST 2003
jw schultz wrote:
>Your attempt to exclude the root directory, if successful,
>would have prevented the whole transfer on the parent
>directory pathwalking principle. So that is not the way to
Yes - I assumed that this was probably some side-effect of the current
implementation - and it's not really so much of a problem, as long as it
is documented behaviour, because it doesn't seem to me to be intuitive
behaviour to joe bloggs... I'd just re-read the include/exclude portion
of the manual page before I started this operation yesterday, to make
sure I was clear on it :-/.
>Using a source of "/." should give the same behavior as you
>are experiencing and "/./" the behavior you want. Wayne may
>have some comments on this.
>My recommendation is to avoid the issue entirely. If you
>are going to sync from root, don't make a directory with
>special permissions requirements the destination. In other
>words, use a subdirectory of /tmp, not /tmp. Changing the
Yes, in accordance with the law of sod, this is exactly what I did on
all the less critical, and non-production machines ;o).
>permissions of /tmp could have dire consequences ranging
>from breaking applications to adversly affecting security.
I can vouch for this.
I've included a documentation patch, after having read Wayne's posting,
but you guys might want to tweak it a bit, or alter it's location, but
hopefully it'll save someone like me a red face ;o).
-------------- next part --------------
--- rsync-2.5.6/rsync.1 2003-10-07 11:00:17.000000000 +0100
+++ rsync-2.5.6/rsync.1.old 2003-10-07 10:39:18.000000000 +0100
@@ -960,16 +960,6 @@
each\&. To add multiple patterns use the --include-from and
--exclude-from options or multiple --include and --exclude options\&.
-Also note that it is currently impossible to exclude the source path
-from the list of files - as doing so with the current underlying
-implementation would mean that no files would be transfered at all\&.
-A subtle implication of this, is that if permission synchronisation is
-enabled, and you have specified that src/ be synchronised with dst/,
-then the permissions of dst/ will get updated with the permissions of
-src/, even if you have explicity attempted to exclude the destination
-path\&. Beware especially when transfering into system directories
-such as /tmp/ - use a subdirectory instead\&.
The patterns can take several forms\&. The rules are:
More information about the rsync