Wrong order of deletion #76

Open
opened 3 months ago by mtrossevin · 0 comments
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 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: evolix/evoadmin-web#76
Loading…
There is no content yet.