Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#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 Emmanuel Blot)

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)

comment:1 by Emmanuel Blot, 18 years ago

Description: modified (diff)
Resolution: worksforme
Status: newclosed

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.

in reply to:  1 comment:2 by Emmanuel Blot, 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.