diff --git a/Duplicati/Server/WebServer/SynologyAuthenticationHandler.cs b/Duplicati/Server/WebServer/SynologyAuthenticationHandler.cs index 928e36144..77fef2a19 100644 --- a/Duplicati/Server/WebServer/SynologyAuthenticationHandler.cs +++ b/Duplicati/Server/WebServer/SynologyAuthenticationHandler.cs @@ -193,7 +193,11 @@ namespace Duplicati.Server.WebServer var groups = GetEnvArg("SYNO_GROUP_IDS"); if (string.IsNullOrWhiteSpace(groups)) + { groups = ShellExec("id", "-G '" + username.Trim().Replace("'", "\\'") + "'", exitcode: 0).Result ?? string.Empty; + groups = groups.Replace(Environment.NewLine, String.Empty); + } + if (!groups.Split(new char[] { ' ' }).Contains("101")) { response.Status = System.Net.HttpStatusCode.Forbidden;