Skip to content

Commit 604c576

Browse files
committed
Fix recursion
1 parent 7689119 commit 604c576

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ES.SFTP.Host/Orchestrator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,15 +385,15 @@ private async Task PrepareUserForSftp(string username)
385385
{
386386
firstParentInChroot = firstParentInChroot.Parent;
387387
}
388-
await ProcessUtil.QuickRun("chown", $"-R {username}:{SftpUserInventoryGroup} {firstParentInChroot.FullName}");
388+
await ProcessUtil.QuickRun("chown", $"{username}:{SftpUserInventoryGroup} {firstParentInChroot.FullName}");
389389
}
390390
catch(Exception exception)
391391
{
392392
_logger.LogWarning(exception,
393393
"Could not determine first parent of '{dir}' in chroot '{chroot}' or failed to set permissions",
394394
directoryInfo.FullName, chrootDirectory.FullName);
395395

396-
await ProcessUtil.QuickRun("chown", $"-R {username}:{SftpUserInventoryGroup} {directoryInfo.FullName}");
396+
await ProcessUtil.QuickRun("chown", $"{username}:{SftpUserInventoryGroup} {directoryInfo.FullName}");
397397
}
398398

399399
}

0 commit comments

Comments
 (0)