mirror of
https://github.com/YunoHost-Apps/pluxml_ynh.git
synced 2024-09-03 20:16:02 +02:00
[enh] set permission to root except data dir
This commit is contained in:
parent
90a9ec6cbf
commit
c7e8704ef3
2 changed files with 10 additions and 2 deletions
|
@ -35,7 +35,10 @@ sudo mkdir -p $final_path
|
|||
|
||||
#copy files to final folder and set permissions
|
||||
sudo cp -R ../sources/* $final_path/
|
||||
sudo chown www-data:www-data -R $final_path
|
||||
sudo chown -R root: $final_path
|
||||
sudo chown -R www-data: $final_path/data
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
|
||||
#configure nginx settings
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
|
||||
|
@ -56,7 +59,6 @@ sudo curl -kL -o install_page.html https://$domain/$path/install.php >/dev/null
|
|||
token=$(sudo cat install_page.html | grep "input" | grep "token" | tail -1 | cut -d' ' -f3 | cut -d'"' -f2)
|
||||
#send http POST values
|
||||
sudo curl -k -X POST --data "default_lang=$default_lang&install=Installer&name=$admin&login=$admin&pwd=$password&pwd2=$password&token=$token" https://$domain/$path/install.php >/dev/null 2>&1
|
||||
sudo chmod 750 -R $final_path
|
||||
|
||||
# If app is private, remove url to SSOWat conf from skipped_uris
|
||||
if [ "$is_public" = "No" ];
|
||||
|
|
|
@ -17,6 +17,12 @@ final_path=/var/www/$app
|
|||
sudo mkdir -p $final_path
|
||||
sudo cp -a ../sources/* $final_path
|
||||
|
||||
sudo chown -R root: $final_path
|
||||
sudo chown -R www-data: $final_path/data
|
||||
sudo find $final_path -type f | xargs sudo chmod 644
|
||||
sudo find $final_path -type d | xargs sudo chmod 755
|
||||
|
||||
|
||||
#configure nginx settings
|
||||
sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue