I’m digging into scripting the creation of a TON of websites because of a migration. I created 2 domains through the web gui. Then I created one using v-add-domain and one through v-add-web-domain. The folder permissions for the domain folder are different when using the v- commands and the gui.
The red arrows point to ones done through the gui. The green point to the 2 using cli v- commands. Which is correct?
I know that folder ownership and permissions are an issue. In scripting the copy of a bunch of sites to this server, I’m sure that there are going to be files that have the wrong permissions (especially since it’s coming from a windows server). Is there a script that can go through the /home folder for each user and fix all permissions/ownership? I didn’t even see a v- command that would do that for a single file. What should the owner/rights be for each level under home?? (I don’t see documentation on that.)
I gather from looking at the code that I should be using v-add-domain instead of v-add-web-domain as it does the setup for mail and dns (correct?).
that’s an interesting find, thanks for the detailed information.
the difference between v-add-domain and v-add-web-domain is, as you already figured, that the latter only creates the web-domain under the given user and no mail domain. dns entries have to be created anyway, so while I am not using the dns server module, I am pretty certain v-add-web-domain does that (for the web-domain) too.
the permissions however should not be different. the GUI is only the graphical extension that runs the very same cli commands in the end, so this needs some investigation I guess.
the missing write permission for the owner on that specific folder should not be a real problem though, as that’s not the docroot but a level above and ideally there would be nothing that need the users change inside.