Skip to content

Commit 0897e41

Browse files
committed
Create symlinks for conveniance, SFTP user should not land in an empty dir.
1 parent 2b30a07 commit 0897e41

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/plugins-available/shelluser_base_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ function insert($event_name, $data) {
168168
$app->system->chown($homedir.'/.profile', $data['new']['username']);
169169
$app->system->chgrp($homedir.'/.profile', $data['new']['pgroup']);
170170

171+
// Create symlinks for conveniance, SFTP user should not land in an empty dir.
172+
symlink('../../web', $homedir.'/web');
173+
symlink('../../log', $homedir.'/log');
174+
symlink('../../private', $homedir.'/private');
175+
171176
//* Disable shell user temporarily if we use jailkit
172177
if($data['new']['chroot'] == 'jailkit') {
173178
$command = 'usermod -s /bin/false -L ? 2>/dev/null';

0 commit comments

Comments
 (0)