Wrong order of deletion #76

Closed
opened 2022-07-01 11:53:53 +02:00 by mtrossevin · 1 comment
Owner

The account deletion part of web-add.sh (which is also used by the web app) delete things in the wrong order.

Indeed, the script delete things in this order:

  1. crontab
  2. web account
  3. account
  4. web account in lxc
  5. account in lxc
  6. alias
  7. ssh permission
  8. home directory
  9. apache vhost
  10. awstats config
  11. fpm config
  12. evoacme config
  13. database

However this isn't the correct order because of the following dependencies.

  • the apache vhost references both the web account and the home directory so it should be deleted before either.
  • the awstats config references the home directory so it should be deleted before the home directory
  • the fpm pool configuration depends on the home directory, the account and the web account being present and cause breakage otherwise so it MUST be deleted before the home directory, the web account (in the lxc container) and the account (in the lxc container)
  • the ssh config references the account so the permission should be removed before the account

Therefore the correct order of deletion should be (there are other options of course):

  1. crontab (might use a lot of other things but not used by anything else)
  2. apache vhost
  3. awstats config
  4. fpm pool configuration
  5. ssh permission
  6. evoacme config? (might be put almost anywhere after the apache vhost (but not before as it is referenced by the vhost))
  7. web account in lxc
  8. account in lxc
  9. alias
  10. web account
  11. account
  12. home directory
  13. database

edit: typo

The account deletion part of web-add.sh (which is also used by the web app) delete things in the wrong order. Indeed, the script delete things in this order: 1. crontab 2. web account 3. account 4. web account in lxc 5. account in lxc 6. alias 7. ssh permission 8. home directory 9. apache vhost 10. awstats config 11. fpm config 12. evoacme config 13. database However this isn't the correct order because of the following dependencies. - the apache vhost references both the web account and the home directory so it should be deleted *before* either. - the awstats config references the home directory so it should be deleted before the home directory - the fpm pool configuration depends on the home directory, the account and the web account being present and cause breakage otherwise so it ***MUST*** be deleted before the home directory, the web account (in the lxc container) and the account (in the lxc container) - the ssh config references the account so the permission should be removed before the account Therefore the correct order of deletion should be (there are other options of course): 1. crontab (might use a lot of other things but not used by anything else) 2. apache vhost 3. awstats config 4. fpm pool configuration 5. ssh permission 6. evoacme config? (might be put almost anywhere after the apache vhost (but not before as it is referenced by the vhost)) 7. web account in lxc 8. account in lxc 9. alias 10. web account 11. account 12. home directory 13. database edit: typo
mtrossevin changed title from Wrong order of suppression to Wrong order of deletion 2022-07-01 12:07:59 +02:00
lpoujol self-assigned this 2023-02-17 12:29:14 +01:00
Owner

Proposed new order in 63dfa3af99 :

  1. Crontab
  2. Vhost & FPM (multi-php)
  3. AWStats (config + cron)
  4. Account (host & container)
  5. /etc/aliases
  6. sshd config (old AllowUsers)
  7. Home directory
  8. SSL/TLS certificate handled by evoacme
  9. MySQL database
Proposed new order in 63dfa3af99e3bbaa728c362c9d3bf3a8cff29a01 : 1. Crontab 1. Vhost & FPM (multi-php) 1. AWStats (config + cron) 1. Account (host & container) 1. /etc/aliases 1. sshd config (old AllowUsers) 1. Home directory 1. SSL/TLS certificate handled by evoacme 1. MySQL database
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: evolix/evoadmin-web#76
No description provided.