File tree Expand file tree Collapse file tree 7 files changed +39
-14
lines changed Expand file tree Collapse file tree 7 files changed +39
-14
lines changed Original file line number Diff line number Diff line change 4
4
$obj = new stdClass();
5
5
$obj->url="";
6
6
$obj->created_at="2023-03-14 16:03 UTC";
7
- $obj->updated_at="2024-01-18 11:43 UTC";
7
+ $obj->updated_at="2025-04-15 12:49 UTC";
8
8
$obj->ai_compatible=false;
9
9
$obj->ai_only=false;
10
10
$obj->revision="f51baaed036a40beed9dba71ca8b2ef5";
11
- $obj->build="2024-01-18 11:43 UTC";
11
+ $obj->build="2025-04-15 12:49 UTC";
12
12
$obj->uuid="58268850-ddaf-4f29-9794-f289820938f2"; #random from https://www.uuidgenerator.net/version4
13
13
$obj->code="ls-sftp-access";
14
14
$obj->name="SFTP Access";
15
15
$obj->description="SFTP Access extension will allow you to enable SFTP access for additional FTP users";
16
16
$obj->version="1.0";
17
- $obj->release="77 ";
17
+ $obj->release="78 ";
18
18
$obj->author=null;
19
19
$obj->vendor="Layershift";
20
20
$obj->example=false;
21
21
$obj->featured=true;
22
- $obj->checksum="43cf5b35977456e91c62da8289badc2d ";
22
+ $obj->checksum="1addd170938b71c5e7b139cba655e43c ";
23
23
$obj->fake=false;
24
- $obj->download_url="https://plesk-extension-catalog.layershift.com/extensions//ls-sftp-access/ls-sftp-access-1.0-77 .zip";
24
+ $obj->download_url="https://plesk-extension-catalog.layershift.com/extensions//ls-sftp-access/ls-sftp-access-1.0-78 .zip";
25
25
$obj->buy_url="";
26
26
$obj->icon="https://plesk-extension-catalog.layershift.com/extensions/ls-sftp-access/64x64.png";
27
27
$obj->screenshots=array(
Original file line number Diff line number Diff line change
1
+ # 1.0-78
2
+ Bug fixes:
3
+ * Check if CageFS is installed and add the /jail folder to the mount points
4
+
1
5
# 1.0-77
2
6
Bug fixes:
3
7
* sshd_config block breaking new variables added at the end of the file
Original file line number Diff line number Diff line change 4
4
<name >SFTP Access</name >
5
5
<description >SFTP Access extension will allow you to enable SFTP access for additional FTP users</description >
6
6
<version >1.0</version >
7
- <release >77 </release >
7
+ <release >78 </release >
8
8
<vendor >Layershift</vendor >
9
9
<url >https://www.layershift.com</url >
10
10
<plesk_min_version >18.0.50</plesk_min_version >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function indexAction()
21
21
$ this ->view ->tabs = $ this ->_getTabs ();
22
22
23
23
$ out ="<table> " ;
24
- $ out .="<tr><td>SFTP for additional FTP users.<br> Version: 1.0.77 </td></tr> " ;
24
+ $ out .="<tr><td>SFTP for additional FTP users.<br> Version: 1.0.78 </td></tr> " ;
25
25
$ out .="</table> " ;
26
26
$ this ->view ->service_status =$ out ;
27
27
Original file line number Diff line number Diff line change 43
43
file_put_contents (pm_Context::getVarDir ()."debug.log " , 'done ' ."\n" , FILE_APPEND );
44
44
45
45
46
- if ( $ isUpgrade == 0 ) {
46
+
47
47
file_put_contents (pm_Context::getVarDir ()."debug.log " , 'executing provision.sh ... ' ."\n" , FILE_APPEND );
48
48
// call provision script
49
49
try {
53
53
exit ;
54
54
}
55
55
file_put_contents (pm_Context::getVarDir ()."debug.log " , 'done ' ."\n" , FILE_APPEND );
56
- }
56
+
57
57
58
58
59
59
exit (0 );
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
printenv
3
- # create the jail home
3
+ # Create the jail home
4
4
mkdir -p -v -m 751 /jail
5
5
chown root.root /jail
6
6
@@ -9,7 +9,7 @@ if [ $? -ne 0 ]; then
9
9
groupadd sftpusers
10
10
fi
11
11
12
- # configure autofs
12
+ # Configure AutoFS
13
13
if [ -d /etc/auto.master.d ]; then
14
14
if [ -f /etc/auto.master.d/ls-sftp-access.autofs ]; then
15
15
mv -v /etc/auto.master.d/ls-sftp-access.autofs /etc/auto.master.d/ls-sftp-access.autofs_$( date +%s)
31
31
fi
32
32
33
33
34
- # configure sshd
34
+ # Configure SSHD
35
35
grep -q " ### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
36
36
if [ $? -eq 0 ]; then
37
- cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config_$( date +%s)
37
+ cp -p - v /etc/ssh/sshd_config /etc/ssh/sshd_config_$( date +%s)
38
38
fi
39
39
40
40
grep -q " ### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
62
62
63
63
systemctl restart sshd
64
64
65
- # prepare persistent configuration files
65
+ # Check if CageFS is installed and add the jail folder to the mount points
66
+ rpm -q cagefs 2>&1 > /dev/null
67
+ if [ $? -eq 0 ]; then
68
+ cat << EOF >> /etc/cagefs/cagefs.mp
69
+ ### ls-sftp-access configuration block begin ###
70
+ /jail
71
+ ### ls-sftp-access configuration block end ###
72
+ EOF
73
+ cagefsctl --remount-all
74
+ fi
75
+
76
+ # Prepare persistent configuration files
66
77
67
78
if [ ! -f /usr/local/psa/admin/conf/ls-sftp-access ]; then
68
79
touch /usr/local/psa/admin/conf/ls-sftp-access;
Original file line number Diff line number Diff line change 3
3
systemctl stop autofs
4
4
systemctl disable autofs
5
5
6
+ # Remove SSHD configuration block
6
7
grep -q " ### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
7
8
if [ $? -eq 0 ]; then
8
9
grep -q " ### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
@@ -12,3 +13,12 @@ if [ $? -eq 0 ]; then
12
13
fi
13
14
fi
14
15
16
+ # Remove the CageFS mounte point
17
+ rpm -q cagefs 2>&1 > /dev/null
18
+ if [ $? -eq 0 ]; then
19
+ grep -q " ### ls-sftp-access configuration block begin ###" /etc/cagefs/cagefs.mp
20
+ if [ $? -eq 0 ]; then
21
+ sed -e ' /^### ls-sftp-access configuration block begin ###/,/^### ls-sftp-access configuration block begin ###/d' -i /etc/cagefs/cagefs.mp
22
+ cagefsctl --remount-all
23
+ fi
24
+ fi
You can’t perform that action at this time.
0 commit comments