mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-09 08:15:13 +03:00
rpm: set proper permissions for /var/lib/sftpgo and /srv/sftpgo
it seems we have to check the permissions after each update, probably because nfpm defines these dirs as empty folders
This commit is contained in:
@@ -29,14 +29,13 @@ if [ "$1" = "configure" ]; then
|
||||
echo "Please be sure to have the python3-requests package installed if you want to use the REST API CLI"
|
||||
fi
|
||||
|
||||
# check permissions for /srv/sftpgo and adjust them if needed
|
||||
# we added /srv/sftpgo after 1.1.0, we should check if we are upgrading
|
||||
# from this version but a non-recursive chmod/chown shouldn't hurt
|
||||
if [ -d /srv/sftpgo ]; then
|
||||
if [ $(stat -c '%U' /srv/sftpgo) != sftpgo ]; then
|
||||
echo "Set permissions for /srv/sftpgo"
|
||||
chown -R sftpgo:sftpgo /srv/sftpgo
|
||||
chmod 750 /srv/sftpgo
|
||||
fi
|
||||
chown sftpgo:sftpgo /srv/sftpgo
|
||||
chmod 750 /srv/sftpgo
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
Reference in New Issue
Block a user