I have a situation where I want a user to be able to have rwx access to just one specific file, the command nano
, /bin/bash
and NOTHING ELSE. The user will be able to log in with ssh.
I followed the second answer from Victor Wong from this question: How to limit user commands in Linux to set up the thing with nano, but so far I couldn't manage to restrict the access to just this file.
With normal linux permissions, the user will always be able to navigate to /etc and even read /etc/groups and more.
I tried these two commands:
setfacl -m u:myuser:0 /
and then setfacl -m u:myuser:rwx /etc/network/interfaces
But then linux tells me permission denied on /etc/network/interfaces
, I guess because the restriction on / is prioritized or just comes first.
I did not try root jail since I read, that you can still open other files with nano then. Am I right with that?
I googled for a couple of hours now and played around but couldn't find a solution yet. Can you guys help me or at least give me the buzzwords too google for / try out?