Author: | rekor001 |
---|---|
Assignees: | - |
Labels: | `area-System.IO` |
Milestone: | - |
Closed kor-ren closed 1 year ago
Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.
Author: | rekor001 |
---|---|
Assignees: | - |
Labels: | `area-System.IO` |
Milestone: | - |
As per https://apple.stackexchange.com/a/301978, the problem is because of macOS's SIP, you need to disable it to be able to use Isolated Storage on macOS.
Changing the default path probably is not an option because it would be a breaking change.
As per https://apple.stackexchange.com/a/301978, the problem is because of macOS's SIP, you need to disable it to be able to use Isolated Storage on macOS.
Changing the default path probably is not an option because it would be a breaking change.
I understand that changing the default path is not a good idea. In my case I'm not using IsolatedStorage directly. I use a library which uses IsolatedStorage. My software would then only work if I disable SIP. And I have to disable it on production systems too, otherwise I cannot run the application.
Would be nice if there is a configuration parameter to change the default path to a custom prefix. Otherwise IsolatedStorage will never work on a Mac by defualt. Only if SIP is disabled which opens security risks.
If you need to unblock you, I wonder if you could temporarily disable SIP and run chown -R youruser /usr/share/IsolatedStorage
then enable SIP back.
Description
IsolatedStorageFile.GetMachineStoreForApplication() returns a folder in
/usr/share/IsolatedStorage/..
which is not writable on MacOS.The code will throw a System.UnauthorizedAccessException.
Reproduction Steps
Expected behavior
A writable folder will be used.
Actual behavior
Used folder is not writable:
Console output from reproduction steps:
Console output:
Regression?
No response
Known Workarounds
No response
Configuration
Dotnet Version: 6.0.412 MacOS Version: 13.4.1 (c) Apple M1 Pro (ARM64)
Other information
Protected folders on Apple:
https://support.apple.com/en-us/HT204899