Ticket #3482 (closed defect: worksforme)
Opened 6 years ago
Last modified 5 years ago
trac-admin hotcopy does not preserve file & directory ownership
| Reported by: | anonymous | Owned by: | daniel |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | admin/console | Version: | 0.9.6 |
| Severity: | minor | Keywords: | hotcopy |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description
trac-admin hotcopy is not preserving the ownership of directories and files. When I do hotcopy, as root, of trac project directory, the resulting copy has user:group of 'root:root' for everything.
I guess that the hotcopy is doing a strait 'cp ...' command. It should be doing archive mode copy i.e. 'cp -a ...' or equivalant 'cp -dpR ...' according to man page.
Yeh Ha! I found a bug and was able to help! I much like this issue tracker.
Best Regards, Jim
Attachments
Change History
comment:1 in reply to: ↑ description Changed 6 years ago by eblot
comment:2 Changed 5 years ago by cboos
- Resolution set to worksforme
- Status changed from new to closed
Well, I think that the workarounds are quite simple: either do the copy as the same user (if you run the script as root, su -c "trac-admin ... hotcopy") or do a chown -R afterwards.
I don't think it's worth adding extra complexity in the hotcopy command for this.



Replying to anonymous:
Wrong guess ;-) It's written in Python, which eventually calls the shutils Python library.