Opened 5 years ago
Last modified 15 months ago
#13247 new enhancement
Log warning if necessary environment directories are not writeable
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | general | Version: | |
Severity: | normal | Keywords: | environment |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The following directories need to be writable:
files
conf
: only if web administration is used. A warning is already raised ("Warning: Error writing to trac.ini, make sure it is writable by the web server. Your changes have not been saved.), but it could still be useful to log at environment startup.
If file
logging is used, log
must be writable, but the following error is already raised:
Internal Server Error TracError: IOError: [Errno 13] Permission denied: u'/Users/rjollos/Documents/Workspace/trac-dev/tracenvs/proj-1.4/log/trac.log'
If SQLite is used, db
must be writable, but an error is already raised/logged:
14:46:59 Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> failed with ConfigurationError: The user <code>rjollos</code> requires read _and_ write permissions to the database file <code>/Users/rjollos/Documents/Workspace/trac-dev/tracenvs/proj-1.4/db/trac.db</code> and the directory it is located in.
We could log a warning in Environment.verify if the directories are not writable. Or we could have the associated module log the warning, such as trac.admin.web_ui
for conf
.
I'd also like to add some guidance to TracInstall
or TracEnvironment
on what files and directories need to be writable by the web server user. TracEnvironment says
The user under which the web server runs will require file system write permission to the environment directory and all the files inside.
However, that's not very precise. Write permissions aren't needed, and may be undesirable for security reasons, for the htdocs
, plugins
and templates
directories.
Attachments (0)
Change History (5)
comment:1 by , 5 years ago
Keywords: | environment added |
---|---|
Milestone: | → 1.4.2 |
Owner: | set to |
Status: | new → assigned |
comment:2 by , 5 years ago
comment:3 by , 5 years ago
Milestone: | 1.4.2 → next-stable-1.4.x |
---|
comment:4 by , 15 months ago
Owner: | removed |
---|---|
Status: | assigned → new |
Replying to Ryan J Ollos:
plugins
needs to be writable if uploading plugins through/admin/general/plugin
. I've never considered that to work very well, maybe we should just remove the feature?Considering check like in SO:2113511/121694 for logging warnings.