Ubuntu Restrict a user to a certain folder

0

Is it possible to only allow a user to connect to my server using FTP/SFTP and they can only access a certain folder for example /var/www/ftp, inside that folder there might be links to other folders but the user does not have full access to the server. I have tried using this tutorial by DigitalOcean here but it does not work for me.

Thanks

Harry Cameron

Posted 2017-11-09T18:36:49.867

Reputation: 11

(This post should not have been upvoted, but I did it to correct what I feel is an overzealous downvote). You should advise what happened with the DigitalOcean tutorial. It would also be good to know what FTP server you used. – davidgo – 2017-11-10T01:51:06.650

Rather then following the tutorial you used, you might want to focus on an FTP based solution based on pureftp - Something like https://help.ubuntu.com/community/PureFTP should guide you through what you are trying to do.

– davidgo – 2017-11-10T01:54:00.207

@davidgo with that tutorial can I make a user group then have different users in that group that have access to different folders? – Harry Cameron – 2017-11-10T20:56:47.000

Also when I try to use the PureFTP and open the pureadmin I get an error (pureadmin:24771): Gtk-WARNING **: cannot open display: Know why? – Harry Cameron – 2017-11-10T21:34:45.643

@HarryCaneron Your error with PureAdmin (which I've never used) may be because you are not in an X window, or you have changed users and lost the X display export settings - but I fear you need to engage an expert as I get the impression you are going to be exposing this to the Internet and you need more knowledge then SU can really provide. – davidgo – 2017-11-10T22:08:37.667

No answers