YunoHost / issues

General issue tracker for the YunoHost project
71 stars 7 forks source link

Custom app permissions are overridden after every app update #2398

Open CodeShakingSheep opened 1 month ago

CodeShakingSheep commented 1 month ago

I followed these instructions to expose some of my YNH apps via SFTP to make them easily editable: https://yunohost.org/en/sftp_on_apps

However, when I update the apps the permission seems to be reset, so that only the dedicate app user has access to them but not the manual user. So, atm after each update I need to run these commands again, which got pretty annoying with time.

setfacl -R -m u:USER:rwX /var/www/wordpress
setfacl -R -d -m u:USER:rwX /var/www/wordpress

I also have another usecase which is affected by this issue. I have Nextcloud and Paperless installed and I exposed the Paperless Consume folder to Nextcloud and added it as additional storage in Nextcloud. Therefore I had to run setfacl -R -m u:nextcloud:rwx paperless-ngx/ beforehand and then added the folder in Nexctloud. This works but after each Paperless update I need to set the permissions again, remove the external storage from Nextcloud and re-add it.

So, I wanted to ask if it's generally possible to keep additional user permissions for an app during an upgrade. Thanks.

tituspijean commented 1 month ago

To make sure your custom modifications are redone upon every upgrade of an app, you should write a hook, notably a post_app_upgrade one.