Skip to content

Commit b708a48

Browse files
committed
version 1.0.78
1 parent 18d1748 commit b708a48

File tree

7 files changed

+39
-14
lines changed

7 files changed

+39
-14
lines changed

extension-catalog/listing.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
$obj = new stdClass();
55
$obj->url="";
66
$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";
88
$obj->ai_compatible=false;
99
$obj->ai_only=false;
1010
$obj->revision="f51baaed036a40beed9dba71ca8b2ef5";
11-
$obj->build="2024-01-18 11:43 UTC";
11+
$obj->build="2025-04-15 12:49 UTC";
1212
$obj->uuid="58268850-ddaf-4f29-9794-f289820938f2"; #random from https://www.uuidgenerator.net/version4
1313
$obj->code="ls-sftp-access";
1414
$obj->name="SFTP Access";
1515
$obj->description="SFTP Access extension will allow you to enable SFTP access for additional FTP users";
1616
$obj->version="1.0";
17-
$obj->release="77";
17+
$obj->release="78";
1818
$obj->author=null;
1919
$obj->vendor="Layershift";
2020
$obj->example=false;
2121
$obj->featured=true;
22-
$obj->checksum="43cf5b35977456e91c62da8289badc2d";
22+
$obj->checksum="1addd170938b71c5e7b139cba655e43c";
2323
$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";
2525
$obj->buy_url="";
2626
$obj->icon="https://plesk-extension-catalog.layershift.com/extensions/ls-sftp-access/64x64.png";
2727
$obj->screenshots=array(

ls-sftp-access/CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0-78
2+
Bug fixes:
3+
* Check if CageFS is installed and add the /jail folder to the mount points
4+
15
# 1.0-77
26
Bug fixes:
37
* sshd_config block breaking new variables added at the end of the file

ls-sftp-access/meta.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<name>SFTP Access</name>
55
<description>SFTP Access extension will allow you to enable SFTP access for additional FTP users</description>
66
<version>1.0</version>
7-
<release>77</release>
7+
<release>78</release>
88
<vendor>Layershift</vendor>
99
<url>https://www.layershift.com</url>
1010
<plesk_min_version>18.0.50</plesk_min_version>

ls-sftp-access/plib/controllers/IndexController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function indexAction()
2121
$this->view->tabs = $this->_getTabs();
2222

2323
$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>";
2525
$out.="</table>";
2626
$this->view->service_status=$out;
2727

ls-sftp-access/plib/scripts/post-install.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
file_put_contents(pm_Context::getVarDir()."debug.log", 'done'."\n", FILE_APPEND);
4444

4545

46-
if ($isUpgrade==0) {
46+
4747
file_put_contents(pm_Context::getVarDir()."debug.log", 'executing provision.sh ...'."\n", FILE_APPEND);
4848
// call provision script
4949
try {
@@ -53,7 +53,7 @@
5353
exit;
5454
}
5555
file_put_contents(pm_Context::getVarDir()."debug.log", 'done'."\n", FILE_APPEND);
56-
}
56+
5757

5858

5959
exit(0);

ls-sftp-access/sbin/provision.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
printenv
3-
# create the jail home
3+
# Create the jail home
44
mkdir -p -v -m 751 /jail
55
chown root.root /jail
66

@@ -9,7 +9,7 @@ if [ $? -ne 0 ]; then
99
groupadd sftpusers
1010
fi
1111

12-
# configure autofs
12+
# Configure AutoFS
1313
if [ -d /etc/auto.master.d ]; then
1414
if [ -f /etc/auto.master.d/ls-sftp-access.autofs ]; then
1515
mv -v /etc/auto.master.d/ls-sftp-access.autofs /etc/auto.master.d/ls-sftp-access.autofs_$(date +%s)
@@ -31,10 +31,10 @@ else
3131
fi
3232

3333

34-
# configure sshd
34+
# Configure SSHD
3535
grep -q "### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
3636
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)
3838
fi
3939

4040
grep -q "### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
@@ -62,7 +62,18 @@ EOF
6262

6363
systemctl restart sshd
6464

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
6677

6778
if [ ! -f /usr/local/psa/admin/conf/ls-sftp-access ]; then
6879
touch /usr/local/psa/admin/conf/ls-sftp-access;

ls-sftp-access/sbin/uninstall.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
systemctl stop autofs
44
systemctl disable autofs
55

6+
# Remove SSHD configuration block
67
grep -q "### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
78
if [ $? -eq 0 ]; then
89
grep -q "### ls-sftp-access configuration block begin ###" /etc/ssh/sshd_config
@@ -12,3 +13,12 @@ if [ $? -eq 0 ]; then
1213
fi
1314
fi
1415

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

0 commit comments

Comments
 (0)