mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
systemd unit: run as "sftpgo" system user
Update the docs too Fixes #177
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user