mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-08-10 09:11:11 +02:00
Merge pull request #1775 from RaspAP/fix/plugin-helper-config
Set permissions on parent directory when handling config files
This commit is contained in:
commit
13929acbd1
@ -46,7 +46,7 @@ case "$action" in
|
|||||||
|
|
||||||
username=$1
|
username=$1
|
||||||
password=$2
|
password=$2
|
||||||
|
|
||||||
if id "$username" &>/dev/null; then # user already exists
|
if id "$username" &>/dev/null; then # user already exists
|
||||||
echo "OK"
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
@ -72,6 +72,7 @@ case "$action" in
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$(dirname "$destination")"
|
mkdir -p "$(dirname "$destination")"
|
||||||
|
chown -R "$raspap_user:$raspap_user" "$(dirname "$destination")"
|
||||||
cp "$source" "$destination"
|
cp "$source" "$destination"
|
||||||
chown -R $raspap_user:$raspap_user "$destination"
|
chown -R $raspap_user:$raspap_user "$destination"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user