Skip to content

Commit 24bcf43

Browse files
Update configuration.php (hestiacp#4827)
* Update configuration.php Fix disparity between using File Manager as a user with SSH access enabled and with SSH access disabled. When disabled, user was presented with a "home" directory, and when enabled, user was taken straight into their "home/$username" directory. I think this is because of historical code that worked prior to the new sftp jail system, but now seems to result in this disparity. I don't see why any user, with or without SSH or SFTP access, would need to see outside of their own "home/$username" directory via the File Manager? * Force update Filemanger conf --------- Co-authored-by: Jaap Marcus <9754650+jaapmarcus@users.noreply.github.com>
1 parent 4f4f7df commit 24bcf43

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

install/deb/filemanager/filegator/configuration.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,7 @@
204204
}
205205
}
206206

207-
preg_match(
208-
'/(Hestia SFTP Chroot\nMatch User)(.*)/i',
209-
file_get_contents("/etc/ssh/sshd_config"),
210-
$matches,
211-
);
212-
$user_list = explode(",", $matches[2]);
213-
if (in_array($v_user, $user_list)) {
214-
$root = "/";
215-
} else {
216-
$root = "/home/" . $v_user;
217-
}
207+
$root = "/home/" . $v_user;
218208

219209
return new \League\Flysystem\Sftp\SftpAdapter([
220210
"host" => "127.0.0.1",

install/upgrade/versions/1.9.3.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ upgrade_config_set_value 'UPGRADE_UPDATE_WEB_TEMPLATES' 'false'
2121
upgrade_config_set_value 'UPGRADE_UPDATE_DNS_TEMPLATES' 'false'
2222
upgrade_config_set_value 'UPGRADE_UPDATE_MAIL_TEMPLATES' 'false'
2323
upgrade_config_set_value 'UPGRADE_REBUILD_USERS' 'no'
24-
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'false'
24+
upgrade_config_set_value 'UPGRADE_UPDATE_FILEMANAGER_CONFIG' 'true'
2525

2626
# Remove jailbash app armour file if abi 4.0 is no installed
2727
if [ ! -f /etc/apparmor.d/abi/4.0 ]; then

0 commit comments

Comments
 (0)