Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6142

limit user to a specifc directory

$
0
0

I have a user on my server which is called John. I set its home directory in /opt/upload_download. I dont want to install anything and want to use default tools of linux. I want to have the follwoing:1- limit the user, so that when I do sftp or WinScp with that user, it gets logged in in its home directory and it shouldnt be able to navigate to its parent directories or other directories. Only in /opt/upload_download and its child directories.

2- Also when doing WinScp it should be be able to do the command:

get "/opt/upload_download/x" "local/path"

I tried Chroot jail for sftp by configuring ssh config file and setting root directory of jail as /opt/upload_download and it works for point number 1. But since root will be /opt/upload_download, point 2 can not be done, because /opt is not available in that case.

Unfortunately ACL is also not installed on server, therefore I am looking for another solution or alternatives. Can anyone help me?

I am using Debian 12 with kernel 6.1.0-23-amd64.


Viewing all articles
Browse latest Browse all 6142

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>