reset permissions

This commit is contained in:
AJ ONeal 2017-05-25 17:43:51 +00:00
parent 648c136fcf
commit 65deaf3a85
1 changed files with 8 additions and 2 deletions

View File

@ -141,7 +141,8 @@ install_etc_config()
$sudo_cmd mv "$my_app_dir/$my_app_etc_config" "$MY_ROOT/$my_app_etc_config"
fi
$sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config")
$sudo_cmd chown -R www-data:www-data $(dirname "$MY_ROOT/$my_app_etc_config") || true
$sudo_cmd chown -R _www:_www $(dirname "$MY_ROOT/$my_app_etc_config") || true
$sudo_cmd chmod 775 $(dirname "$MY_ROOT/$my_app_etc_config")
$sudo_cmd chmod 664 "$MY_ROOT/$my_app_etc_config"
}
@ -220,11 +221,16 @@ install_my_app()
sudo mkdir -p /srv/walnut/etc/org.oauth3.provider
sudo mkdir -p /srv/walnut/packages/{client-api-grants,rest,api,pages,services,sites}
#sudo chown -R $(whoami):$(whoami) /srv/walnut
sudo chown -R www-data:www-data /srv/walnut
sudo chown -R www-data:www-data /srv/walnut || true
sudo chown -R _www:_www /srv/walnut || true
sudo chmod -R ug+Xrw /srv/walnut
pushd /srv/walnut/core
sudo chown -R $(whoami) /srv/walnut
#sudo --user www-data --group www-data npm install
npm install
sudo chown -R www-data /srv/walnut || true
sudo chown -R _www /srv/walnut || true
popd
}