systemd unit: run as "sftpgo" system user

Update the docs too

Fixes #177
This commit is contained in:
Nicola Murino
2020-09-25 18:23:04 +02:00
parent b23276c002
commit 4ebedace1e
4 changed files with 30 additions and 28 deletions

View File

@@ -906,6 +906,11 @@ func TestEscapeHomeDir(t *testing.T) {
assert.NoError(t, err)
_, err := client.ReadDir(testDir)
assert.Error(t, err, "reading a symbolic link outside home dir should not succeeded")
err = client.Chmod(path.Join(testDir, "sub", "dir"), os.ModePerm)
if assert.Error(t, err) {
assert.Contains(t, err.Error(), "SSH_FX_FAILURE")
}
assert.Error(t, err, "setstat on a file outside home dir must fail")
testFilePath := filepath.Join(homeBasePath, testFileName)
testFileSize := int64(65535)
err = createTestFile(testFilePath, testFileSize)