Код: Выделить всё
runuser: warning: cannot change directory to /home/the-user-i-want-to-use: No such file or directory
realpath(/home/smb/sambashare/mail-sync/MailMonitor.dll) failed: Permission denied
System.UnauthorizedAccessException: Access to the path '/home/the-user-i-want-to-use' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileSystem.CreateParentsAndDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
at System.IO.Directory.CreateDirectory(String path)
at Microsoft.Extensions.EnvironmentAbstractions.DirectoryWrapper.CreateDirectory(String path)
at Microsoft.DotNet.Configurer.FileSystemExtensions.c__DisplayClass0_0.b__0()
at Microsoft.DotNet.Cli.Utils.FileAccessRetrier.RetryOnIOException(Action action)
at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
at Microsoft.DotNet.Cli.Program.Main(String[] args)
Команда: runuser -l the-user-i-want-to-use -c '/usr/bin/dotnet /home/smb/sambashare/mail-sync/MailMonitor.dll'
Код: Выделить всё
realpath(/home/smb/sambashare/mail-sync/MailMonitor.dll) failed: Permission denied
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET program, but dotnet-/home/smb/sambashare/mail-sync/MailMonitor.dll does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Я не могу найти, в чем дело, поскольку пользователь, от имени которого я хочу выполнить операцию, владеет файлами в /home/smb/sambashare/mail-sync/< /code> и я также позаботился о том, чтобы setfacl -m u:the-user-i-want-to-use:rwx /home/smb/sambashare/mail-sync/, но без игральных костей.
Подробнее здесь: https://stackoverflow.com/questions/790 ... ion-denied