mirror of
https://github.com/YunoHost-Apps/yeswiki_ynh.git
synced 2024-09-03 18:05:56 +02:00
feat(_commons): Create helper for ir rigthss
This commit is contained in:
parent
27850d7b5b
commit
2238345fae
1 changed files with 13 additions and 0 deletions
|
@ -15,6 +15,19 @@ loginldap_version="2021-03-01-2"
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# update directory right
|
||||||
|
# | arg: app - The application's name ; default : yeswiki
|
||||||
|
# | arg: final_path - The path of the application's folder
|
||||||
|
# yeswiki_update_dir_rights yeswiki /var/www/yeswiki
|
||||||
|
yeswiki_update_dir_rights() {
|
||||||
|
local app="${1:-yeswiki}"
|
||||||
|
local final_path="${2}"
|
||||||
|
|
||||||
|
chown -R $app:$app $final_path
|
||||||
|
chmod -R u=rwX,g=rwX,o-rwx $final_path
|
||||||
|
chmod -R o+rwX $final_path/{cache,files}
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue