[Mono-list] mono trying to mkdir /etc/mono/registry

Robert Jordan robertj at gmx.net
Thu Jul 3 04:31:54 EDT 2008


Hi,

Carl Cerecke wrote:
> Hi,
> 
> I have a C# .NET application successfully running on mono, but it
> requires certain directories to exist in /etc/mono.
> 
> In particular, these must exist, or it fails to run ("mkdir
> /etc/mono/registry" from somewhere inside mono gets permission denied)
> :
> 
> $ find /etc/mono/registry
> /etc/mono/registry
> /etc/mono/registry/LocalMachine
> /etc/mono/registry/ClassesRoot
> 
> If I run the C# app as root, it mkdirs these for me. Then I can run it
> as an ordinary user no problems. Note that there are no files at all
> in any of these directories.
> 
> Any idea how I can convince mono to not try to create these?

Your application is trying to open some key from the LocalMachine
registry tree in read/write mode. This fails for non-admins on unix
and it usually also fails on MS.NET/Windows unless the current user
has read/write access rights for the key.

You should either fix the app to deal with the fact that registry
operations may fail or set the environment variable
MONO_REGISTRY_PATH to a path inside user's home:

$ MONO_REGISTRY_PATH=~/.mono/registry mono yourapp.exe

Robert



More information about the Mono-list mailing list