virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
330 stars 102 forks source link

Deleting domain Alias - says it is going to delete its home directoy #937

Closed shoulders closed 1 month ago

shoulders commented 1 month ago
SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.5
Usermin version 2.102
Virtualmin version 7.20.2 Pro
Theme version 21.20.7
Apache version 2.4.52
Package updates 8 package updates are available

The issue

An domain alias should not have a home directory

image

solution

can you amend the notifications or tell me I am wrong? 😄

iliajie commented 1 month ago

Hello,

That’s odd! How does this alias domain look like in navigation menu dropdown?

shoulders commented 1 month ago

This is using my main admin login image

The one that start with hg. The primary is .co.uk and the aliase are .uk and .com

also

image

This account is from a cpanel import if it makes any dofference

jcameron commented 1 month ago

That message isn't really wrong - alias domains do still have their own home directory.

shoulders commented 1 month ago

alias domains do still have their own home directory.

They should not have one from an end- users point of view.

Is this a hidden folder used as a work around? Maybe the message on-screen needs changing as from what I read, it is going to delete my files.

does there even need to be a message saying it is going to delete the home folder if there are no user files or settings?

i.e. this home folder does not contain any userfiles and is just a requirement to allow aliases to work????

Clarification is definitely needed on this one.

thanks

iliajie commented 1 month ago

alias domains do still have their own home directory.

They should not have one from an end- users point of view.

@shoulders This only applies to aliases with their own email.

@jcameron In that case, we should show “Home directory” on the “Virtual Server Summary” page, but currently, we didn't. I have fixed that on the associated commit. Now I’m also wondering if we should allow editing alias home directory using the similar change here, as well:

https://github.com/virtualmin/virtualmin-gpl/blob/master/edit_domain.cgi#L90-L94

jcameron commented 1 month ago

It's almost always empty, so there's usually nothing to delete to be honest. I suppose we could hide this message for alias domains to avoid scaring users :-)

shoulders commented 1 month ago

Just incase this was not fixed, when you delete the alias you get the following, including deleting home page

Deleting mail aliases ..
.. done

Removing from target virtual website ..
.. done

Deleting home directory ..
.. done

Deleting server details for tonkatoys.uk ..
.. done

Updating Webmin user ..
.. done

Re-loading Webmin ..
.. done

Re-starting Usermin ..
.. done

Restarting mail server ..
.. done

Applying webserver configuration ..
.. done
iliajie commented 1 month ago

It's almost always empty, so there's usually nothing to delete to be honest. I suppose we could hide this message for alias domains to avoid scaring users :-)

I don’t think this is the right approach! If the directory exists, we have to tell user about!?

iliajie commented 1 month ago

Deleting home directory .. .. done

This is expected since the home directory exists. I already explained earlier that aliases with their own user have a home directory, and everything related to that had been already working correctly. I believe this patch should be reverted rather than continuing down the wrong path...

jcameron commented 1 month ago

Yeah I think it's fine to keep that message

shoulders commented 1 month ago

Consider the delete message

Home directory - the home directory for this virtual server, containing all website and otherwise, will be deleted.

From the Docs

https://www.virtualmin.com/docs/getting-started/understanding-virtual-server-and-account-types/#understanding-virtual-server-aliases An alias allows a domain to act exactly like another, sharing the same website and email addresses. This is useful for having multiple domains like example.com and example.net display the same website content.

my thoughts

iliajie commented 1 month ago
  • Amend the message to actually match the docs and what people expect

Agreed! Fixed here https://github.com/virtualmin/virtualmin-gpl/commit/5bbe26034cda38a5ecd982ebb6bf0c8e47b6b56c.

Thanks for bringing this up!

shoulders commented 1 month ago

Much better message for alias. Less frightening and more consistent.

iliajie commented 1 month ago

Much better message for alias. Less frightening and more consistent.

Thanks for pointing this out in the first place!