Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3770 closed defect (worksforme)

Cannot delete attachment

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: 0.9.6
Severity: normal Keywords: needinfo
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I uploaded a power point file .ppt through the wiki attachment. When I download the file, it cannot be opened because it indicates that it is corrupt. I believe binary attachments are corrected in .10, however, I would like to delete the attachment from my application. When I attempt to delete the attachment, it returns an error "Could not delete attachment". How can I delete the attachment from my trac instalation and wiki page.

Attachments (1)

trac.log (3.3 KB ) - added by anonymous 18 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Matthew Good, 18 years ago

Keywords: needinfo added

If you've enabled TracLogging check the log for an OSError exception which should give the reason the file could not be deleted. This is most likely a problem with the permissions of the file or the "attachments" folder in your project. Make sure that all the files in your project are owned by the same user that your web server runs as.

E.g.:

chown -R www-data /var/trac/my-project

comment:2 by anonymous, 18 years ago

I turned on logging and you are correct, it is definitely permissions. However, I'm still baffled at why its throwing a permission exception. I'm in a windows 2003 environment. It was the app that created the file so it should have delete permissions. I set the file to full control anonomyous and it continues to throw the error. I've attached the log if it can be of any help, but it's clearly permissions.

by anonymous, 18 years ago

Attachment: trac.log added

comment:3 by anonymous, 18 years ago

I'm also running on a Windows 2003 environment. I can add and delete ticket attachments without any errors on 0.10, so it seems to be something particular to your set up, not Trac or Win2k3.

comment:4 by sid, 18 years ago

Check out this email thread: http://mail.python.org/pipermail/python-list/2006-January/318913.html

Basically, the thread on the Python mailing list says that this can happen if the file is opened by another process while you are trying to do the delete. This could be the case if you have a virus scanner going or a desktop search application, "file deletion recovery" services, and possibly others.

comment:5 by sid, 18 years ago

This looks like a problem on the specific machine with permissions. Proposing to close as worksforme.

comment:6 by sid, 18 years ago

Resolution: worksforme
Status: newclosed

No reply for 6 months seems long enough.. closing.

comment:7 by Christian Boos, 18 years ago

Hey sid, welcome back!

In case you've not noticed it yet, I've created report:21, similar to {20} but specific for tracking the needinfo tickets (as I've removed the needinfo ones from {20}).

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.