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

Access to the path 'HIC.Rdmp.HicPlugin.Plugin.6.1.6.rdmp' is denied when read-only #1882

Open
rkm opened this issue Jul 15, 2024 · 1 comment
Assignees

Comments

@rkm
Copy link
Collaborator

rkm commented Jul 15, 2024

Describe the bug

Permissions errors are raised when running RDMP CLI on a read-only installation.

It is desirable to make software packages read-only when deploying to some environments. I assumed the *.rdmp files were static data, but write access is expected.

To Reproduce

  1. Download the RDMP CLI v8.2.0
  2. Unpack and make read-only
  3. Run ./rdmp --dir ../yamlrepo

Expected behavior

The CLI executes as normal.

Screenshots

N/A.

RDMP Version

v8.2.0

Error with Stack Trace

> ./rdmp --dir ../yamlrepo/
2024-07-15 10:21:55.4823 INFO Dotnet Version:8.0.6 .
2024-07-15 10:21:55.5136 INFO RDMP Version:8.2.0.0 .
2024-07-15 10:21:55.7443 ERROR Access to the path '/home/rkm/tmp/rdmp-8.2.0-cli-linux/HIC.Rdmp.HicPlugin.Plugin.6.1.6.rdmp' is denied. .
2024-07-15 10:21:55.7443 INFO Fatal error occurred so returning -1 . System.UnauthorizedAccessException: Access to the path '/home/rkm/tmp/rdmp-8.2.0-cli-linux/HIC.Rdmp.HicPlugin.Plugin.6.1.6.rdmp' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at Rdmp.Core.Curation.Data.LoadModuleAssembly.HandlePluginVersioning() in D:\a\RDMP\RDMP\Rdmp.Core\Curation\Data\LoadModuleAssembly.cs:line 55
   at Rdmp.Core.Curation.Data.LoadModuleAssembly.PluginFiles() in D:\a\RDMP\RDMP\Rdmp.Core\Curation\Data\LoadModuleAssembly.cs:line 124
   at Rdmp.Core.Startup.Startup.LoadMEF(ICatalogueRepository catalogueRepository, ICheckNotifier notifier) in D:\a\RDMP\RDMP\Rdmp.Core\Startup\Startup.cs:line 245
   at Rdmp.Core.Startup.Startup.DoStartup(ICheckNotifier notifier) in D:\a\RDMP\RDMP\Rdmp.Core\Startup\Startup.cs:line 119
   at Rdmp.Core.CommandLine.Options.RDMPCommandLineOptions.DoStartup(ICheckNotifier checkNotifier) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\Options\RDMPCommandLineOptions.cs:line 91
   at Rdmp.Core.CommandLine.RdmpCommandLineBootStrapper.Run(RDMPCommandLineOptions opts, IRunner explicitRunner, IRDMPPlatformRepositoryServiceLocator existingLocator) in D:\a\RDMP\RDMP\Rdmp.Core\CommandLine\RdmpCommandLineBootStrapper.cs:line 159
   at Rdmp.Core.Program.HandleArguments(String[] args, Logger logger) in D:\a\RDMP\RDMP\Tools\rdmp\Program.cs:line 83

Database Engine

N/A.

Additional context

N/A.

@JFriel
Copy link
Collaborator

JFriel commented Jul 15, 2024

Looks like the .rdmp plugin handler is opening the files with read/write permissions. We can get this fixed for v8.2.1

@JFriel JFriel self-assigned this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants