Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13387 closed enhancement (fixed)

diagram image is created on Linux with no read access for group

Reported by: andrei.diaconu@… Owned by: Jun Omae
Priority: normal Component: TracWorkflowAdminPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

In our case, trac runs as www-data, and backup of tracs is done using a different user. Whenever a new .png diagram is created, the backup script fails because it is not allowed to read it.

I checked the source, and the file is create with 0600 access rights because you call mkstemp() in _create_diagram_image().

A possible solution could be to copy tmp to path and delete tmp instead of renaming it. I guess the file would be created with default access rights.

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Jun Omae

This is the same issue of #13273.

Please try patch in comment:5:ticket:13273 and let me know the result.

comment:2 Changed 6 years ago by andrei.diaconu@…

That's exactly the solution I proposed. I tested it and it works as expected.

Could you please apply that patch and make it official? It looks like I'm not the only one to require this, and I really don't like running custom-patched plugins. With every upgrade I need to apply it again, and who knows if then it will match the code. Performance wise I don't think it is a problem. I certainly didn't see anything slowdown.

comment:3 Changed 6 years ago by Jun Omae

Resolution: fixed
Status: newclosed

In 17071:

tracworkflowadmin: respect umask to create workflow cache file (closes #13387)

comment:4 Changed 6 years ago by Jun Omae

Side note: conf/trac.ini has the same issue. If you consider this behavior is a defect, please report to https://trac.edgewall.org/newticket.

$ ls -l /path/to/tracenv/conf/trac.ini
-rw------- 1 jun66j5 jun66j5 6199 Mar 13 12:25 /path/to/tracenv/conf/trac.ini

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.