Skip to main content
Tweeted twitter.com/#!/StackUnix/status/510939164762976256
added 23 characters in body
Source Link
terdon
  • 252.7k
  • 69
  • 481
  • 719

I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. However, just creating a user and enabling ssh access is totoo generous - the user then can log on via ssh and see whatever there is see-ablethat is viewable by everybody.

I need the user after the login to land downfind themselves in certain foldera specific directory after login, and, according to their privileges, read/write files, as well as create folders where permitted. No access to any file or directory above the user's "root" folder.

What would be the suggested method to achieve this? Is there some very restricted shell type for this? I tried with

$ usermod -s /bin/false <username> 

But that does not let the user to cd into subfolders of their base folder.

I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. However, just creating user and enabling ssh access is to generous - user then can log on via ssh and see whatever there is see-able by everybody.

I need the user after the login to land down in certain folder, and, according to their privileges, read/write files, as well as create folders where permitted. No access to any file or directory above the user's "root" folder.

What would be the suggested method to achieve this? Is there some very restricted shell type for this? I tried with

$ usermod -s /bin/false <username> 

But that does not let the user to cd into subfolders of their base folder.

I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. However, just creating a user and enabling ssh access is too generous - the user then can log on via ssh and see whatever there is that is viewable by everybody.

I need the user to find themselves in a specific directory after login, and, according to their privileges, read/write files, as well as create folders where permitted. No access to any file or directory above the user's "root" folder.

What would be the suggested method to achieve this? Is there some very restricted shell type for this? I tried with

$ usermod -s /bin/false <username> 

But that does not let the user to cd into subfolders of their base folder.

edited tags
Link
terdon
  • 252.7k
  • 69
  • 481
  • 719
Source Link
Passiday
  • 315
  • 3
  • 5
  • 13

Provide sftp read/write access to folder and subfolders, restrict all else

I need to provide user access to Ubuntu 14.04 Server, only limited to certain folder. To enjoy the ssh security and not to open up new service and ports (ie, ftp), I'd like to stick with sftp. However, just creating user and enabling ssh access is to generous - user then can log on via ssh and see whatever there is see-able by everybody.

I need the user after the login to land down in certain folder, and, according to their privileges, read/write files, as well as create folders where permitted. No access to any file or directory above the user's "root" folder.

What would be the suggested method to achieve this? Is there some very restricted shell type for this? I tried with

$ usermod -s /bin/false <username> 

But that does not let the user to cd into subfolders of their base folder.