#13387 closed enhancement (fixed)
diagram image is created on Linux with no read access for group
Reported by: | 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 7 years ago by
comment:2 Changed 7 years ago by
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:4 Changed 7 years ago by
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
This is the same issue of #13273.
Please try patch in comment:5:ticket:13273 and let me know the result.