mirror of
https://github.com/YunoHost-Apps/cops_ynh.git
synced 2024-09-03 18:25:57 +02:00
Adjustment on htpasswd access rights
This commit is contained in:
parent
a6d9eedb66
commit
f074e59c32
3 changed files with 9 additions and 8 deletions
|
@ -88,15 +88,16 @@ sudo cp -a ../sources/* $final_path/
|
|||
|
||||
# Set permissions
|
||||
sudo chmod 775 -R $final_path
|
||||
sudo chown -hR $runninguser:$runninguser $final_path
|
||||
|
||||
if [ "$basicauthcreate" = "Yes" ];
|
||||
then
|
||||
sudo chmod 600 $final_path/htpasswd
|
||||
sudo chmod 440 $final_path/htpasswd
|
||||
sudo chown www-data:www-data $final_path/htpasswd
|
||||
else
|
||||
echo "Nothing to do"
|
||||
fi
|
||||
|
||||
sudo chown -hR $runninguser:$runninguser $final_path
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
|
|
|
@ -36,15 +36,15 @@ sudo cp -a ./sources/* $final_path/
|
|||
# Restore permissions to app files
|
||||
# you may need to make some file and/or directory writeable by www-data (nginx user)
|
||||
sudo chown -R $runninguser:$runninguser $final_path
|
||||
|
||||
if [ "$basicauthcreate" = "Yes" ];
|
||||
then
|
||||
sudo chmod 600 $final_path/htpasswd
|
||||
sudo chmod 440 $final_path/htpasswd
|
||||
sudo chown www-data:www-data $final_path/htpasswd
|
||||
else
|
||||
echo "Nothing to do"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
### MySQL (remove if not used) ###
|
||||
# If a MySQL database is used:
|
||||
# # Create and restore the database
|
||||
|
|
|
@ -78,16 +78,16 @@ sudo cp -a ../sources/* $final_path/
|
|||
|
||||
# We adjust permissions
|
||||
sudo chmod 775 -R $final_path
|
||||
sudo chown -hR $runninguser:$runninguser $final_path
|
||||
|
||||
if [ "$basicauthcreate" = "Yes" ];
|
||||
then
|
||||
sudo chmod 600 $final_path/htpasswd
|
||||
sudo chmod 440 $final_path/htpasswd
|
||||
sudo chown www-data:www-data $final_path/htpasswd
|
||||
else
|
||||
echo "Nothing to do"
|
||||
fi
|
||||
|
||||
sudo chown -hR $runninguser:$runninguser $final_path
|
||||
|
||||
|
||||
# Make app public if necessary
|
||||
is_public=$(ynh_app_setting_get $app is_public)
|
||||
|
|
Loading…
Add table
Reference in a new issue