Hello,
I am using Virtualmin and Virtualmin Pro and I am experiencing the following issue:
I have a specific project for which it is necessary for the FTP user to have access to one directory above the document root, which by default is always public_html.
I was not able to find information how to create an FTP user through the panel, which after login will be placed in the “/home/testdomain” directory instead of “/home/testdomain/public_html”.
In order to provide user access to a directory above public_html, I have to edit the default home directory of user (removing public_html dir) through the webmin menu.
webmin → users and groups → Select user and edit default home dir.
After that when user log via FTP have access above „public_html“.
Everything “looks fine” so far, but when these described steps are performed on a subdomain.
Тhe user whose default directory is edited (removed public_html) - user disappears from the „Edit Users“ menu in virtualmin.
I was able to reproduce this problem also on “pro” version of virtualmin panel.
If default home dir on user is edited again, restore public_html dir, user appear again in panel, but then he doesn’t have access one directory above public_html.
This only happens with users to a „subdomain“, I was not able to recreate it with a user who is part of a „top-level server“.
Is the described behavior expected, or is it a panel bug because it only occurs with users who are part of a subdomain?
by this do you mean a subserver of a toplevel domain or a subdomain created as a toplevel server as virtualmin can do either, if the former a quick fix is to convert the subserver to a toplevel server via the move server option in virtualmin
„quick fix“ is not a variant because my client have absolute paths in his project.
If i try to convert subserver to a top-level server, panel change directory path. It removes directory „domains“ in which every subdomain is placed. This will broke the project.
Can you clarify what the extra user should do? You mentioned, “I was not able to find information on how to create an FTP user through the panel, which after login will be placed in the /home/testdomain directory instead of /home/testdomain/public_html” .
Do you want that extra user access files in /home/testdomain but not in /home/testdomain/public_html?
Why not create a user whose home directory will be in default ~/homes/?
No, as i describe i want user to have access one dir up from default root which is public_html dir.
Client want to create some directory and put files in which will use.
But when i achieve that via removing public_html from user default home path, user disappear from panel and that’s confusig bcs the same tactic work on top-level server.
I didn’t try to change proftp config file.
Just in case to confirm that i understand you right, you sugges to change this row in config file of proftp from „DefaultRoot ~“ to „DefaultRoot ~/homes/“
We always do our best to help our users. In this comment, I gave you a straightforward answer, explaining how things should be done to reach your goal. I mentioned it works with the default Virtualmin setup and added, jokingly, that if custom configurations break stuff, it’s best to avoid them.
If you’re confident that your manual configuration is correct, just provide the exact steps to reproduce it, one by one, and we’ll take it from there. If English isn’t your first language, feel free to formulate your question in your native language and use AI to translate it into English. It’ll save time and effort for everyone.
I did that in first comment, but may you didn’t read it.
Created a subdomain to an already existing main domain.
Create a FTP user to this subdomain.
Edit default home dir on this FTP user via Webmin menu or manually editing path in „/etc/passwd“ file. Just remove „public_html“ at the ent of path and save.
Check in menu „Edit Users“ for this subdomain and see that user is not appearing.
This can be reproduced on a fresh panel installation
Alright, now I’d say this is an unnecessary limitation! You can work around it by leaving a trailing slash at the end of the user’s home directory, i.e.:
@Jamie, let’s consider removing this limitation and allowing admins to create FTP users who can navigate starting from the domain’s home directory. This restriction seems unnecessary. The defaults can remain as they are, but the text field should accept an empty value or at least ~/.