Opened 14 years ago
Last modified 14 years ago
#10168 new defect
trac generates error 500 in case no prermission to conf/trac.ini
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | general | Version: | 0.12.2 |
Severity: | normal | Keywords: | bitesized |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Hi,
I just spend several hours trying to debug a trac problem. Which can be easily reproduced.
I got …
Trac Error TracError: The Trac Environment needs to be upgraded. Run "trac-admin /srv/trac upgrade"
Then I realized that by changing the owner of the config file conf/trac.ini it got to work.
To reproduce this do:
root@Apollon:/srv/trac # chown root conf/trac.ini root@Apollon:/srv/trac # ll conf/trac.ini -rw------- 1 root apache 6,8K 5. Mai 18:18 conf/trac.ini root@Apollon:/srv/trac # service httpd restart httpd beenden: [ OK ] httpd starten: [ OK ]
It does now not work.
root@Apollon:/srv/trac # chown apache conf/trac.ini root@Apollon:/srv/trac # service httpd restart httpd beenden: [ OK ] httpd starten: [ OK ]
Now it works again.
I am using Trac 0.12.3dev-r10683.
Attachments (0)
Change History (4)
comment:1 by , 14 years ago
Keywords: | bitesized added |
---|---|
Milestone: | → next-major-0.1X |
follow-up: 3 comment:2 by , 14 years ago
We could also warn against running trac-admin
as root? At the very least in the docs (TracEnvironment, TracAdmin), but maybe even at the comment line (e.g. printerr(_("Warning: running as root, modified files might become unreadable by others."))
).
comment:3 by , 14 years ago
Replying to cboos:
We could also warn against running
trac-admin
as root?
Now that you mention it, that might indeed be a good idea. Funnily enough, I am running trac-admin
as root regularly, and have never had an issue.
/me hides in shame
comment:4 by , 14 years ago
Well, yes, that warning could quickly grow annoying for advanced users. We should rather report in a more explicit way the lack of reading permissions when that happens (we do have a ticket for the trac.ini case, #10044).
Yes, that's not a very intuitive error message. We have another ticket for log file permissions, but none for
trac.ini
AFAICT.