1

I have set a users permission like this

groupadd mygroup
useradd -G mygroup ftp
chown -R :mygroup /var/www
chmod -R g+rw /var/www

Now how can I restrict access for this user (or is it group?) to allow the user to not be able to read anything out of the directory /var/www?

maxisme
  • 159
  • 1
  • 10
  • Is the user going to be allowed shell access, or only FTP? Because the second is much easier to ensure than the first. – HBruijn Feb 05 '15 at 13:33
  • The user is going to be only allowed ftp! – maxisme Feb 05 '15 at 13:34
  • Then please choose a [FTP server](http://en.wikipedia.org/wiki/List_of_FTP_server_software) and read it's manual. The relevant term is typically how to set up "chroot" users. – HBruijn Feb 05 '15 at 13:37

1 Answers1

0

First of all you have to edit /etc/vsftpd.conf to read:

chroot_local_user=YES

And then perform the command:

usermod --home /var/www/ ftp 

Where ftp is the user

maxisme
  • 159
  • 1
  • 10