Edgewall Software

Ticket #3482 (closed defect: worksforme)

Opened 2 years ago

Last modified 20 months 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:

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

in reply to: ↑ description   Changed 2 years ago by eblot

Replying to anonymous:

I guess that the hotcopy is doing a strait 'cp ...' command.

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

  Changed 20 months ago by cboos

  • status changed from new to closed
  • resolution set to worksforme

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.

Add/Change #3482 (trac-admin hotcopy does not preserve file & directory ownership)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from daniel. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.