I’ve just installed virtualmin/webmin and I must admit I’m impressed!
The only problem I’m having as of now is when creating a new virtual server, I want to restrict FTP access to the virtual server’s PUBLIC_HTML FOLDER only. I’ve tried adding the --Add a website FTP access user-- and this doesn’t work. Also under --FTP Directory Restrictions-- I have included the path to the public_html folder and this doesn’t work either. I would greatly appreciate any advice.
I’m not sure how I’d do exactly what you’re after.
The best thing I can think of would be to simply disable FTP for the primary account, and to create a second FTP account for each Virtual Server, that would be restricted to public_html,
In Limits and Validation -> FTP Directory Restrictions, you can set a restriction up for “Users’ home directories” (make sure the “Active” checkbox is checked too).
Once you do that – users would be restricted to whatever their home directory is.
From there, you could could create a new FTP account for the Virtual Server, and then set it’s home directory to be the public_html folder.
I tried adding a new FTP user, and listing website subdirectory as home/account/public_html, but keep getting this error…Failed to save mailbox : Home directory must be an existing directory for website FTP users – what am I doing wrong? Thanks again!
If you go into Mail and FTP Users, and click “Add a website FTP access user”, that will actually default to using the public_html folder as the home directory.
You wouldn’t actually need to change what the home directory is, you could just go with the default.
I believe you’re getting the above error because it’s trying to add that path onto the /home/USERNAME/public_html that it’s using already.
I’m using centos 5.4. The only error I’m getting is from file zilla. Nothing in var/log.
–Status: Connecting to 98…
Response: fzSftp started
Command: open “michael@98…” 22
Command: Pass: ******
Error: Authentication failed.
Error: Critical error
Error: Could not connect to server
Status: Waiting to retry…
Status: Delaying connection due to previously failed connection attempt…
Status: Connecting to 98…
Response: fzSftp started
Command: open “michael@98…” 22–
Hrm, whenever you attempt to log in via FTP, what entry shows up in /var/log/secure?
Also, do you know what shell the user you’re attempting to log in as is using? The user would have to have a supported shell, one of the ones listed in /etc/shells.
A typical FTP user might have the /bin/false shell… and a typical email user might have the /dev/null shell.
The email user isn’t expected to ever log into Webmin or FTP, so a shell is chosen for it that would prevent access. However, if you’re trying to log in using FTP to a user with /dev/null as a shell, you might get the error you’re seeing (and that would likely show up in /var/log/secure).
ok i create a new ftp user, by default is in its own folder. If i login in the ftp and go back to public_html and try to ceate a folder i get a permission denied error. So i go back and try to put public_html in the Subdirectory of server’s home field and get this error:
Failed to save mailbox : Home directory /home/xxxxx/public_html already exists
However virtualmin help says:
Home directory
This field can be used to choose a custom home directory for a mailbox user. For example, you may want his home to be under the public_html directory, so that he can easily create web files.
This looks like a bug. Very surprising in such a basic feature.
What exactly did you put in the Home Directory field when creating (or editing) the new user? You should not put public_html itself there, otherwise that directory is considered the user’s home and will e.g. be deleted alongside with the user if you delete the user.
As the help says, the user home directory should be “automatic”, thus creating one under “homes”, or a subdirectory of (being “under”) public_html.
Yepp, Eric is quite right. In that case, the public_html also will not get deleted along with the user, even though it’s their home directory. So that’s indeed the way to go.
i was just start to play with virtualmin and i must to say is a very nice control panel.
Ok, i was start to use it on CentOS 6.0, after the user was created (test), i go it to System -> Administration -> Users and Groups there i was change the Home Directory from /home/test to /home/test/public_html