Bug 14366 - 'Access to the path "/etc/mono/registry/last-btime" is denied' when starting fsharpi
Summary: 'Access to the path "/etc/mono/registry/last-btime" is denied' when starting ...
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-09-01 05:29 UTC by jmchapman+bugzilla
Modified: 2013-09-05 11:43 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description jmchapman+bugzilla 2013-09-01 05:29:18 UTC
I have encountered this problem on Mac OS X with Mono 3.2.1, and debian with Mono 2.10.8.1 (Debian 2.10.8.1-8) and fsharp built from source from github.

If you run fsharpi as root/via sudo then it creates the directory registry and the file last-btime

$ sudo fsharpi

...

#quit;;

If you then run fsharpi as non-root then you get a (apparently non-fatal) error on startup:

$ fsharpi

F# Interactive for F# 3.0 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License

For help type #help;;

> While saving registry data at /Library/Frameworks/Mono.framework/Versions/3.2.1/lib/../etc/mono/4.5/../registry/last-btime: System.UnauthorizedAccessException: Access to the path "/Library/Frameworks/Mono.framework/Versions/3.2.1/etc/mono/registry/last-btime" is denied.
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding)
  at Microsoft.Win32.KeyHandler.SaveRegisteredBootTime (System.String path, Int64 btime) [0x00000] in <filename unknown>:0
Comment 1 jmchapman+bugzilla 2013-09-01 05:40:47 UTC
removing the registry directory seems to fix the problem.
Comment 2 Zoltan Varga 2013-09-05 11:43:58 UTC
Fixed in master.