mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Merge pull request #179 from YunoHost-Apps/testing
Fix uploads permissions
This commit is contained in:
commit
4ab3a71c2d
5 changed files with 25 additions and 12 deletions
|
@ -3,3 +3,5 @@
|
||||||
php_admin_value[upload_max_filesize] = 50M
|
php_admin_value[upload_max_filesize] = 50M
|
||||||
php_admin_value[memory_limit] = 64M
|
php_admin_value[memory_limit] = 64M
|
||||||
php_admin_value[post_max_size] = 50M
|
php_admin_value[post_max_size] = 50M
|
||||||
|
|
||||||
|
php_admin_value[upload_tmp_dir] = __FINALPATH__/wp-content/temp/
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Create a beautiful blog or website easily",
|
"en": "Create a beautiful blog or website easily",
|
||||||
"fr": "Logiciel de création de blog ou de site Web"
|
"fr": "Logiciel de création de blog ou de site Web"
|
||||||
},
|
},
|
||||||
"version": "5.9.3~ynh1",
|
"version": "5.9.3~ynh2",
|
||||||
"url": "https://wordpress.org/",
|
"url": "https://wordpress.org/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "GPL-2.0",
|
"license": "GPL-2.0",
|
||||||
|
|
|
@ -232,10 +232,14 @@ $wpcli_alias plugin activate wp-fail2ban-redux $plugin_network
|
||||||
|
|
||||||
# Set file and directories ownership
|
# Set file and directories ownership
|
||||||
mkdir -p $final_path/wp-content/uploads
|
mkdir -p $final_path/wp-content/uploads
|
||||||
chmod 750 "$final_path"
|
mkdir -p $final_path/wp-content/temp
|
||||||
chmod -R o-rwx "$final_path"
|
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chmod g+s $final_path/wp-content/uploads
|
find "$final_path" -type d -exec chmod 750 {} \;
|
||||||
|
find "$final_path" -type f -exec chmod 640 {} \;
|
||||||
|
find "$final_path/wp-content/uploads" -type d -exec chmod 770 {} \;
|
||||||
|
find "$final_path/wp-content/temp" -type d -exec chmod 770 {} \;
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/uploads"
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/temp"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
|
|
|
@ -75,11 +75,15 @@ ynh_script_progression --message="Restoring the app main directory..."
|
||||||
ynh_restore_file --origin_path="$final_path"
|
ynh_restore_file --origin_path="$final_path"
|
||||||
|
|
||||||
# Set file and directories ownership
|
# Set file and directories ownership
|
||||||
chmod 750 "$final_path"
|
mkdir -p $final_path/wp-content/uploads
|
||||||
chmod -R o-rwx "$final_path"
|
mkdir -p $final_path/wp-content/temp
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chmod g+s $final_path/wp-content/uploads
|
find "$final_path" -type d -exec chmod 750 {} \;
|
||||||
chmod g+s $(find $final_path/wp-content/uploads -type d)
|
find "$final_path" -type f -exec chmod 640 {} \;
|
||||||
|
find "$final_path/wp-content/uploads" -type d -exec chmod 770 {} \;
|
||||||
|
find "$final_path/wp-content/temp" -type d -exec chmod 770 {} \;
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/uploads"
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/temp"
|
||||||
|
|
||||||
chmod 400 "$final_path/wp-config.php"
|
chmod 400 "$final_path/wp-config.php"
|
||||||
chown $app:$app "$final_path/wp-config.php"
|
chown $app:$app "$final_path/wp-config.php"
|
||||||
|
|
|
@ -280,11 +280,14 @@ $wpcli_alias plugin is-installed http-authentication && $wpcli_alias plugin deac
|
||||||
|
|
||||||
# Set file and directories ownership
|
# Set file and directories ownership
|
||||||
mkdir -p $final_path/wp-content/uploads
|
mkdir -p $final_path/wp-content/uploads
|
||||||
chmod 750 "$final_path"
|
mkdir -p $final_path/wp-content/temp
|
||||||
chmod -R o-rwx "$final_path"
|
|
||||||
chown -R $app:www-data "$final_path"
|
chown -R $app:www-data "$final_path"
|
||||||
chmod g+s $final_path/wp-content/uploads
|
find "$final_path" -type d -exec chmod 750 {} \;
|
||||||
chmod g+s $(find $final_path/wp-content/uploads -type d)
|
find "$final_path" -type f -exec chmod 640 {} \;
|
||||||
|
find "$final_path/wp-content/uploads" -type d -exec chmod 770 {} \;
|
||||||
|
find "$final_path/wp-content/temp" -type d -exec chmod 770 {} \;
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/uploads"
|
||||||
|
setfacl -Rm d:g:www-data:rwX "$final_path/wp-content/temp"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
|
|
Loading…
Add table
Reference in a new issue