-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Copy/Create file on NFS share on macOS #72786
Comments
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsDescriptiondotnet on macOS is not able to copy files to a NFS share. The NFS share is working perfectly from "Terminal" and "Finder", files can be created/copied and deleted all works. But from a dotnet (Net6) application I get "UnauthorizedAccess", when writing. Read is working fine. Reproduction StepsSetup NFS share on Linux /etc/exports
Mount on macOS from Finder "nfs://servername/files" will mount on "/Volumes/files" Terminal and Finder can read and write. Expected behaviorShould be able to create directory and copy files Actual behaviorType: System.UnauthorizedAccessException at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func Regression?Not sure if it has been working before. (On Mono it worked). Known WorkaroundsNone Configurationdotnet version: 6.0.6 Other informationNo response
|
Thanks for the report. It would be interesting to compare IO traces to when this is done successfully (eg in the shell). On Linux one would use strace. I don't have access to a Mac but I believe it has something similar called dtrace? |
It works on my macbook using the three ways you mentioned (finder, terminal, and .NET app). This is my
I also did a I'm not sure what might be different on your mac. Perhaps you could share the strace that @danmoseley mentioned (it's called dtruss on macos). |
This issue has been marked |
|
@jozkee Could you try using this code:
|
I am 99% sure that it's #55256. The problem is that the fix was tested only on Linux (as there were no macOS bug reports). We need to implement proper file system detection for apple (#69852) and most likely backport the change to 7.0 and 6.0 (it should not be hard; we should be able to reuse the freebsd implementation) |
Description
dotnet on macOS is not able to copy files to a NFS share.
The NFS share is working perfectly from "Terminal" and "Finder", files can be created/copied and deleted all works.
But from a dotnet (Net6) application I get "UnauthorizedAccess", when writing. Read is working fine.
Reproduction Steps
Setup NFS share on Linux
/etc/exports
Mount on macOS from Finder "nfs://servername/files" will mount on "/Volumes/files"
Terminal and Finder can read and write.
Expected behavior
Should be able to create directory and copy files
Actual behavior
Regression?
Not sure if it has been working before. (On Mono it worked).
Known Workarounds
None
Configuration
dotnet version: 6.0.6
macOS: Catalina
Other information
No response
The text was updated successfully, but these errors were encountered: