How to restrict FTP user to a sub folder

8 posts / 0 new
Last post
#1 Thu, 03/25/2010 - 21:42
jflesher

How to restrict FTP user to a sub folder

I'm using Virtualmin Pro and I need to know How to restrict FTP user to a sub folder. I created an FTP user and changed it to Website subdirectory and put in a sub folder; it saved it; but does not work; I have seen other threads about this issue; but none of them solved it.

I tried to setup FTP Directory Restrictions; but it would not take any sub folder under others.

How can I do this; step by step with some details if needed.

Thanks.

Thu, 03/25/2010 - 22:16
andreychek

It's typically done by setting a particular directory as a users home directory (ie, the sub-folder you want them restricted to), then setting up an FTP Directory Restriction.

To setup the restriction, you'd go into Limits and Validation -> FTP Directory Restrictions, choose "Users' home directories", and then check the "Active" box.

After that, hit save, and you should be in good shape!

-Eric

Thu, 03/25/2010 - 22:35
jflesher

Thanks; that worked; I was very close; just needed to check Users home directories

Jeffrey Scott Flesher
Medically Retired Gulf War Vet

Sat, 03/27/2010 - 18:51
pcspyoffice

Hy to everybody! indeed connecting to virtualmin server from an ftp client like filezila from 21 it is restrict the user to his home folder, but when i using ftp with ssh with that user i can see all content of the server: /etc /home , etc.

Mon, 03/21/2011 - 09:48 (Reply to #4)
hoekie

exactly the point! (sorry for reopening after one year) It is not working for me. I just want some Virtual Servers with one main SSH user for everything on this Vitual Server. Then I'll have appr.100 domains as SubServers and these are all with the same user. So now how do I create a second user who will only have FTP access to evertything in the Virtual Server, but no access to '/' and beyond...

Mon, 03/21/2011 - 09:54 (Reply to #5)
andreychek

Howdy,

You should be able to do all that using the steps mentioned above:

"To setup the restriction, you'd go into Limits and Validation -> FTP Directory Restrictions, choose "Users' home directories", and then check the "Active" box.".

When you add an FTP user, you'd want to add them by going into Edit Mail and FTP Users, and use "Add a website FTP access user". That will give you an FTP user who's homedir is setup within the public_html folder.

If that doesn't work for you, let us know what's not working specifically and we can try to get that straightened out :-)

-Eric

Tue, 03/22/2011 - 06:09
hoekie

True, and after reading http://www.virtualmin.com/documentation/security/faq , I understand how awful FTP can be.

Anyway I accept the possible nosiness and I tried creating new FTP users. Then I encountered this issue: The new username will be USERNAME.HOST . The Virtual Server has a non-existing domainname, e.g. editorial.machine8 . It contains many Sub-Servers with real domainnames. You see? The new FTP username will be newuser@editorial.machine8 and its login will be newuser.editorial, but at what Server?

Do I have to enable "IP-based virtual FTP enabled" feature for this?

All I want is to setup some Virtual Servers with many SubServers and Aliases and the FTP users (one for each VS) are not allowed to edit eachothers domains.

Tue, 03/22/2011 - 09:23
andreychek

Howdy,

Prior to creating an FTP user, you have to select a domain name from the drop-down on the top-left.

Whatever domain name is set there -- that's the domain your FTP user will be part of.

That is, if you create an "FTP Access User", that FTP access user will be put into the public_html for that particualr domain.

And no, you wouldn't need "IP-based virtual FTP enabled". That's a pretty fancy feature that is only needed in a small handful of circumstances.

-Eric

Topic locked