1

I am trying to run the doxygen command (I'm using Windows 10 with Cygwin and the packages Doxygen, Graphviz and the g++ compiler installed with it) and, at the end of the execution, I get the following error:

Error: Could not open "/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png" for writing: Permission denied

error: Problems running dot: exit code=1, command='dot', arguments='"/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png" -Tpng -o "/cygdrive/c/Users/alexl/Desktop/src/DOC/html/graph_legend.png"'

I also get sixteen other warnings with the following structure:

Warning: Cannot open file <filename>.png for writing

I've been searching for hours why this may occurr. I've tried running command prompt as an administrator, but the error still persists. Any help would be greatly appreciated.

  • Which version of doxygen and dot are you using? This looks a bit like a permission problem, but you ran also as administrator so should not be the cause (but please check your umask and the permissions of / in the html directory on cygwin level). Another, unlikely, possibility might be disk full / quota exceeded as the dot run is at the end of a doxygen run. When you run `doxygen -d extcmd` you will get a.o. the command to be execute for the dot command, can you try the mentioned command for one of the failing files and check what is happening. – albert Mar 30 '21 at 08:17
  • 1
    Try to not use the `/cygdrive/c/Users/alexl/Desktop` path but instead something like `/usr/src` or `/tmp/src` . Inherited permissions could be a problem on Windows user directory – matzeri Mar 30 '21 at 10:06
  • I'm using doxygen version 1.9.1 and dot version 2.40.1. I've tried running `doxygen -d extcmd` and I get the same error message. I'm not getting any a.o. But I've noticed that when I try to run `dot grpah_legend.dot -Tpng -o graph_legend.png` I get the error `Error: Could not open "graph_legend.png" for writing: Permission denied`. That's weird. I may have to reinstall graphviz. How can I check the permissions of the html on cygwin level? @albert – alexland7219 Mar 30 '21 at 11:49
  • cygwin has *nix commands so the easiest way is by means of `ls -ls` – albert Mar 30 '21 at 13:25
  • I get `-rwx------+` on every file and `-rw-r--r--+` on the file `graph_legend.dot`. @albert – alexland7219 Mar 30 '21 at 14:17
  • For the dot files I have as permission: `-rw-rw-r--` and as umask `0022`. What happens when you remove the dot files and regenerate? What is your umask? – albert Mar 30 '21 at 15:59
  • If I remove the dot files and regenerate I get `-rw-r--r--+` for all of the files and as umask `0022` @albert – alexland7219 Mar 30 '21 at 16:30
  • And did it regenerate the png files? otherwise also do the same for the png files. Strange that you get `-rw-r--r--+` with the umask `0022`. When still a problem remove entire html directory and retry. It must be something specific with the settings as I don't have the problem. – albert Mar 30 '21 at 16:48
  • So I tried what @matzeri suggested and it finally worked as expected. It must've been a problem having to do with inherited permissions on Windows user directory. Thanks for the help albert & matzeri. – alexland7219 Mar 30 '21 at 17:21
  • Glad that it is working, those windows permissions .... – albert Mar 30 '21 at 17:32

0 Answers0