Modify

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#11155 closed defect (worksforme)

File permission errors

Reported by: anonymous Owned by: Ryan J Ollos
Priority: normal Component: GraphvizPlugin
Severity: normal Keywords:
Cc: Christian Boos Trac Release: 1.0

Description (last modified by Jun Omae)

I'm not sure what causes it but quite often the following error is thrown when trying to check in a new graph. The error occurs at line 640 in graphviz.py (0.7.5dev):

    os.unlink(os.path.join(self.cache_dir, file))

Trac detected an internal error:

WindowsError: [Error 5] Access is denied: u'D:\\www\\apache\\trac\\htdocs\\acct_mgr'

Attachments (0)

Change History (12)

comment:1 Changed 11 years ago by Jun Omae

Description: modified (diff)

comment:2 Changed 11 years ago by Ryan J Ollos

In 13275:

Refs #11155: Make tagged versions final, and bump version on trunk.

comment:3 in reply to:  description ; Changed 11 years ago by Ryan J Ollos

Cc: Christian Boos added; anonymous removed
Owner: changed from Peter Kropf to Ryan J Ollos
Status: newassigned

Replying to anonymous:

I'm not sure what causes it but quite often the following error is thrown when trying to check in a new graph.

Just to be certain, do you mean when the wiki page is saved?

The error occurs at line 640 in graphviz.py (0.7.5dev):

    os.unlink(os.path.join(self.cache_dir, file))

Trac detected an internal error:

WindowsError: [Error 5] Access is denied: u'D:\\www\\apache\\trac\\htdocs\\acct_mgr'

It looks like you've installed from the 0.11-0.7.5 tag, except that the exception must be coming from line 620, not 640, if that is the case.

Side note: Since 0.11-0.7.5 is a "tag", I've bumped the version from 0.7.5dev to 0.7.6 just now, and bumped the trunk to 0.7.7dev (from 0.7.6dev). The development lines for this plugin are a bit of a mess at the moment since the trunk and 1.0 have diverged. I will need to discuss with cboos how to sort that out.

What value have you set for [graphviz] cache_dir in trac.ini? It looks as though you have cache_dir = D:\www\apache\trac, and it is trying to clean out files in your Trac environment directory. If you remove the cache_dir option from trac.ini, it looks like it should create a dir named gvcache in your Trac environment directory.

Finally, I would like to encourage you to register for an account so that you'll receive email notifications when someone replies to a ticket that you've opened.

comment:4 Changed 11 years ago by Ryan J Ollos

Keywords: needinfo added

comment:5 Changed 11 years ago by anonymous

I have the following set: cache_dir = D:\www\apache\trac\htdocs.

The README.txt says:

The cache manager is an attempt at keeping the cache directory under control. This is experimental code that may cause more problems than it fixes.

Should I disable it just to be sure?

Unfortunately I don't really have the time to update to the latest version right now. I always have to figure out again how to install trac packages on Windows..

comment:6 in reply to:  5 Changed 11 years ago by Ryan J Ollos

Keywords: needinfo removed
Resolution: worksforme
Status: assignedclosed

Replying to anonymous:

I have the following set: cache_dir = D:\www\apache\trac\htdocs.

You shouldn't be storing directly in htdocs. You could store in htdocs\gvcache or some other directory below htdocs if you can get the permissions set correctly for that directory. You see, the GraphvizPlugin cleans up after itself in order to keep the cache size from growing too large, so you shouldn't mix your htdocs and graphviz files in the same directory, otherwise GraphvizPlugin could try to delete important files such as JavaScript and CSS source code that is stored in htdocs.

What led you to use that location? Is it because you've configured your webserver to serve static files from that location, and you'd like the webserver to handle image files rather than Trac?

The README.txt says:

The cache manager is an attempt at keeping the cache directory under control. This is experimental code that may cause more problems than it fixes.

Should I disable it just to be sure?

I think you should just change cache_dir. If you don't care where the files are stored (i.e. no webserver considerations), just remove the cache_dir option from trac.ini.

Unfortunately I don't really have the time to update to the latest version right now. I always have to figure out again how to install trac packages on Windows..

No reason to update at this time. Just change your configuration.

comment:7 in reply to:  3 ; Changed 8 years ago by Christian Boos

Replying to rjollos:

The development lines for this plugin are a bit of a mess at the moment since the trunk and 1.0 have diverged. I will need to discuss with cboos how to sort that out.

I've just found out about this myself now ;-) Will fix (trunk -> tags/0.11-0.7.7, 1.0 -> trunk).

comment:8 Changed 8 years ago by Christian Boos

In 15365:

GraphvizPlugin: freeze old trunk to version 0.7.7. Refs #11155.

comment:9 Changed 8 years ago by Christian Boos

In 15366:

GraphvizPlugin: prepare for new trunk, rebased on 1.0 branch. Refs #11155.

comment:10 Changed 8 years ago by Christian Boos

In 15369:

GraphvizPlugin: restart trunk based on 1.0 branch (1.0.0.8). Refs #11155.

comment:11 in reply to:  7 ; Changed 8 years ago by Christian Boos

Replying to cboos:

Replying to rjollos:

The development lines for this plugin are a bit of a mess at the moment since the trunk and 1.0 have diverged. I will need to discuss with cboos how to sort that out.

I've just found out about this myself now ;-) Will fix (trunk -> tags/0.11-0.7.7, 1.0 -> trunk).

Done. I think it's better now.

Besides the clarification, I have a few plans for the trunk version:

  • make it compatible with the Jinja2 branch (i.e. no Genshi)
  • move the cache_manager infrastructure and some utilities for gathering content from executing binaries in Trac proper (trac.mimeview.cache?)

comment:12 in reply to:  11 Changed 8 years ago by Ryan J Ollos

Replying to cboos:

  • move the cache_manager infrastructure and some utilities for gathering content from executing binaries in Trac proper (trac.mimeview.cache?)

That's great. I've wanted to do that as well since it will help with several plugins that cache images. PlantUmlMacro is the one that comes to mind immediately.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.