Friday, September 22, 2017

linux - Restrict FTP account access down to several directories



Is there any way, to restrict access to SSH and FTP account down to only several directories.



For example on our VPS we have some paths like:



@project root/proj1
@project root/proj2

@project root/proj3


And i want that user1 could access all three, user2 only second and user3 only first and second. Moreover is there any way to show to users only directories allowed to access?



I mean, if for example there are such directorys as:



/var/www/project
/var/www/project2
/var/www/project3



And user might go only to project and project2, but not to project3. So he could access /var/www, but not /var.



P.S. We have DirectAdminand Debian Squeeze.


Answer



You can do this by making symlinks to the real locations in each users' home directory, and restricting FTP access to the home directory only.



ProFTPd can do this, among others.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...