Page 1 of 1

How to limit a user to a specific directory?

Posted: 2018/05/15 15:14:08
by hongtrang
My server running pure-fpt. I used the following command to create users and add them to the directory

Code: Select all

pure-pw useradd newuser -u newuser -g newusers -d /home/newuser/public_html
chown -R newusers:newuser /home/newuser/public_html
But this user can access other folders like /home, /etc or /var, /opt ...
So how can the user only be allowed access to the public_html directory above

Thanks!

Re: How to limit a user to a specific directory?

Posted: 2018/05/15 16:28:59
by desertcat
hongtrang wrote:My server running pure-fpt. I used the following command to create users and add them to the directory

Code: Select all

pure-pw useradd newuser -u newuser -g newusers -d /home/newuser/public_html
chown -R newusers:newuser /home/newuser/public_html
But this user can access other folders like /home, /etc or /var, /opt ...
So how can the user only be allowed access to the public_html directory above

Thanks!
Can you create a /home/newuserID and create a directory called /public_html which all users have access to, but then using chmod make directories like /home, /etc, /var, /opt, etc. and put them all under a directory called /Admin under a group called Admin that could only be accessed by a few select people (systems administrators) which is password protected. That way newusers are left in their own little ghetto, and even IF one is a hacker and can figure out where all those "missing" directories have gone s/he then has to crack a Password just to make themselves part of the Admin group. IF they can manage to do that offer them a job!!! :lol:

Re: How to limit a user to a specific directory?

Posted: 2018/05/15 16:32:52
by TrevorH
We dont ship pureftp so it's not a product I am familiar with. Our ftp daemon is vsftpd. On that you can set up chroot environments that stop users from getting to places they shouldn't. I would suspect pureftp has a similar functionality - you just need to find someone who knows that package or, alternatively, read the documentation for it.

Re: How to limit a user to a specific directory?

Posted: 2018/05/16 07:44:15
by hongtrang
TrevorH wrote:We dont ship pureftp so it's not a product I am familiar with. Our ftp daemon is vsftpd. On that you can set up chroot environments that stop users from getting to places they shouldn't. I would suspect pureftp has a similar functionality - you just need to find someone who knows that package or, alternatively, read the documentation for it.
Thank you, me was resolve with the USERS VIRTUAL
https://download.pureftpd.org/pub/pure- ... tual-Users