mirror of
https://github.com/YunoHost-Apps/lionwiki-t2t_ynh.git
synced 2024-09-03 19:36:27 +02:00
Simplify permissions
This commit is contained in:
parent
dacc341595
commit
fb9f51e5bb
3 changed files with 9 additions and 18 deletions
|
@ -182,23 +182,10 @@ ynh_store_file_checksum --file="$final_path/menu.php"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root: $final_path
|
chown -R $app:www-data $final_path
|
||||||
chmod -R o-rwx $final_path
|
chmod -R o-rwx $final_path
|
||||||
|
find $final_path -type d -exec chmod g=rx {} +
|
||||||
# Wiki needs to write inside these folders. Make "Wiki" owner
|
find $final_path -type f -exec chmod g=r {} +
|
||||||
chown -R $app:root $final_path/var
|
|
||||||
chown -R $app:root $final_path/templates
|
|
||||||
|
|
||||||
# write everything, even config files, for pheditor:
|
|
||||||
chown -R $app:root $final_path/
|
|
||||||
|
|
||||||
# Allow access to public assets like style sheets
|
|
||||||
find $final_path/templates -type f -print0 | xargs -0 chmod 0644
|
|
||||||
find $final_path/templates -type d -print0 | xargs -0 chmod 0755
|
|
||||||
find $final_path/templates/minimaxing/minimaxing.css -type f -print0 | xargs -0 chmod 0755
|
|
||||||
# Using "find" instead of "chmod -R 755" so files does not become executable too
|
|
||||||
# chmod : -rwxr-xr-x 1 root root 241 May 3 08:36 index.html => BAD
|
|
||||||
# find : -rw-r--r-- 1 1001 1002 241 May 3 08:36 index.html => GOOD
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
|
|
|
@ -68,8 +68,10 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Restore permissions on app files
|
# Restore permissions on app files
|
||||||
chown -R root: $final_path
|
chown -R $app:www-data $final_path
|
||||||
chmod -R o-rwx $final_path
|
chmod -R o-rwx $final_path
|
||||||
|
find $final_path -type d -exec chmod g=rx {} +
|
||||||
|
find $final_path -type f -exec chmod g=r {} +
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -125,8 +125,10 @@ ynh_restore_file -o "conf/config.php"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions on app files
|
# Set permissions on app files
|
||||||
chown -R root: $final_path
|
chown -R $app:www-data $final_path
|
||||||
chmod -R o-rwx $final_path
|
chmod -R o-rwx $final_path
|
||||||
|
find $final_path -type d -exec chmod g=rx {} +
|
||||||
|
find $final_path -type f -exec chmod g=r {} +
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Reference in a new issue