Modify ↓
#3568 closed defect (worksforme)
Cannot attach a file
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.9.6 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Python traceback
Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 206, in handler dispatch_request(mpr.path_info, mpr, env) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 107, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 267, in process_request self._do_save(req, attachment) File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 335, in _do_save attachment.insert(filename, upload.file, size) File "/usr/lib/python2.4/site-packages/trac/attachment.py", line 142, in insert os.makedirs(self.path) File "/usr/lib/python2.4/os.py", line 156, in makedirs makedirs(head, mode) File "/usr/lib/python2.4/os.py", line 159, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/lib/trac/dev/attachments/wiki'
Attachments (0)
Change History (2)
follow-up: 2 comment:1 by , 18 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:2 by , 18 years ago
For example, if you run debian, the attachments/wiki directory should be writable by user "www-data".
Actually, this directory is created by Trac on first attachment attempt, you should check out the permission of the attachments
directory.
Note:
See TracTickets
for help on using tickets.
It looks like a configuration issue to me:
Did you check that all the directories under
/var/lib/trac/dev/attachments
are all writable by your web server?For example, if you run debian, the attachments/wiki directory should be writable by user "www-data".
Such a misconfiguration often occurs when you first create your environment (with
trac-admin
) as root or a regular user, while your web server uses a dedicated account to execute.