Edgewall Software
Modify

Opened 18 years ago

Closed 17 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)

in reply to:  description comment:1 by Emmanuel Blot, 18 years ago

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.

comment:2 by Christian Boos, 17 years ago

Resolution: worksforme
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain daniel.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from daniel to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.