Opened 18 years ago
Closed 18 years ago
#3482 closed defect (worksforme)
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: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal 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 (0)
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → 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.