Browse Source
Merge pull request #119 from YunoHost-Apps/fix_internal_server_error
Fix failed access after first installation (fixes #98)
pull/117/head^2
JimboJoe
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
15 deletions
-
hooks/post_user_create
-
scripts/install
-
scripts/upgrade
|
|
|
@ -2,5 +2,4 @@ |
|
|
|
|
|
|
|
user=$1 |
|
|
|
|
|
|
|
sudo mkdir -p /home/$user |
|
|
|
sudo setfacl -m g:#GROUP#:rwx /home/$user |
|
|
|
@ -183,6 +183,10 @@ exec_occ ldap:test-config \'\' \ |
|
|
|
if [ $user_home -eq 1 ]; then |
|
|
|
exec_occ app:enable files_external |
|
|
|
create_external_storage "/home/\$user" "Home" |
|
|
|
# Iterate over users to extend their home folder permissions |
|
|
|
for u in $(ynh_user_list); do |
|
|
|
setfacl -m g:$app:rwx "/home/$u" || true |
|
|
|
done |
|
|
|
fi |
|
|
|
|
|
|
|
#================================================= |
|
|
|
@ -265,13 +269,6 @@ find ${datadir}/ -type d -print0 | xargs -0 chmod 0750 |
|
|
|
chmod 640 "${final_path}/config/config.php" |
|
|
|
chmod 755 /home/yunohost.app |
|
|
|
|
|
|
|
# Iterate over users to extend their home folder permissions - for the external |
|
|
|
# storage plugin usage - and create relevant Nextcloud directories |
|
|
|
for u in $(ynh_user_list); do |
|
|
|
mkdir -p "${datadir}/${u}" |
|
|
|
setfacl -m g:$app:rwx "/home/$u" || true |
|
|
|
done |
|
|
|
|
|
|
|
#================================================= |
|
|
|
# SETUP LOGROTATE |
|
|
|
#================================================= |
|
|
|
|
|
|
|
@ -271,6 +271,10 @@ if [ $user_home -eq 1 ]; then |
|
|
|
exec_occ files_external:list --output=json \ |
|
|
|
| grep -q '"storage":"\\\\OC\\\\Files\\\\Storage\\\\Local"' \ |
|
|
|
|| create_external_storage "/home/\$user" "Home" |
|
|
|
# Iterate over users to extend their home folder permissions |
|
|
|
for u in $(ynh_user_list); do |
|
|
|
setfacl -m g:$app:rwx "/home/$u" || true |
|
|
|
done |
|
|
|
fi |
|
|
|
|
|
|
|
#================================================= |
|
|
|
@ -329,13 +333,6 @@ find ${datadir}/ -type d -print0 | xargs -0 chmod 0750 |
|
|
|
chmod 640 "${final_path}/config/config.php" |
|
|
|
chmod 755 /home/yunohost.app |
|
|
|
|
|
|
|
# Iterate over users to extend their home folder permissions - for the external |
|
|
|
# storage plugin usage - and create relevant Nextcloud directories |
|
|
|
for u in $(ynh_user_list); do |
|
|
|
mkdir -p "${datadir}/${u}" |
|
|
|
setfacl -m g:$app:rwx "/home/$u" || true |
|
|
|
done |
|
|
|
|
|
|
|
#================================================= |
|
|
|
# WARNING ABOUT THIRD-PARTY APPS |
|
|
|
#================================================= |
|
|
|
|