Skip to content
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

Crash when trying to access directory without permissions [linux] #3

Open
wipe2238 opened this issue May 1, 2021 · 0 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@wipe2238
Copy link
Owner

wipe2238 commented May 1, 2021

dotnet run --project ScanMsg/ScanMsg.NET5.csproj -- /
dotnet run --project ScanMsg/ScanMsg.NET5.csproj -- /root

Scanning files...Unhandled exception. System.UnauthorizedAccessException: Access to the path '/root' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerator.Unix.cs:line 79
   at System.IO.Enumeration.FileSystemEnumerator`1.Init() in /_/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerator.Unix.cs:line 39
   at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerator.cs:line 41
   at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerable.cs:line 38
   at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerableFactory.cs:line 125
   at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Directory.cs:line 181
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) in /_/src/libraries/System.IO.FileSystem/src/System/IO/Directory.cs:line 143
   at ScanMsg.ScanMsg.MainScan(List`1 args) in /home/wipe/tmp/ScanMsg/ScanMsg/ScanMsg.cs:line 645
   at ScanMsg.ScanMsg.Main(String[] args) in /home/wipe/tmp/ScanMsg/ScanMsg/ScanMsg.cs:line 469
@wipe2238 wipe2238 added the bug Something isn't working label May 1, 2021
@wipe2238 wipe2238 added this to the v1.0 milestone May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant