DO NOT REPLY [Bug 6197] New: Perms/owner/group modifiers for "show" filters

samba-bugs at samba-bugs at
Thu Mar 19 04:38:37 GMT 2009

           Summary: Perms/owner/group modifiers for "show" filters
           Product: rsync
           Version: 3.1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: core
        AssignedTo: wayned at
        ReportedBy: matt at
         QAContact: rsync-qa at

Add modifiers for "show" filters that affect the file-list attributes of
matching files.  I propose this syntax:

- p(CHMOD-TWEAKS) : apply the CHMOD-TWEAKS like the --chmod option (overloaded
with "perishable")
- o(USER) : set the user owner to USER
- g(GROUP) : set the group owner to GROUP

Issues to be considered:
- Interaction with --chmod, --chown, --usermap, --groupmap options
- Per-dir merge files become more powerful, so copying from an untrusted source
with a per-dir merge rule becomes more dangerous.  Do we care?

I am hoping to use this enhancement in the build process of my Web site.  I
have all the content in a "build tree" with makefiles to generate pages from a
template.  Then I call rsync with a bunch of filters to mirror a subset of the
build tree to the Web server's document root.  Different areas of the document
root need different permissions: almost everything is 755/644, but as one
notable exception, the /private dir is 711.  I applied the desired permissions
manually, but I want to make sure they don't get messed up.  With this
enhancement, I could add p(...) modifiers to the rsync filters to have it apply
the permissions automatically on every build.  For example:

rsync -rltp --filter='Sp(u=rwX,go=X) /private' --filter='Sp(u=rwX,go=rX) *' \
    build/ /var/www/html/

More generally, this enhancement could be used to implement any "make
install"-like step with a single rsync run, which I feel would be a significant
advance over install(1).  With --delete-missing-args, "make uninstall" could
probably be implemented as well.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list