3

Basically at the moment I am using rbash to stop a user from leaving his directory on my system. The problem with this is, there is a script in my bin which he needs to be able to run from a script in his bin (it is because I am using screen).

The issue with this is that he gets the permission denied error because he can not CD out of his directory like the script that is in his bin requires him to do.

I thought that the simple answer would to very simply make root the owner of the script by following the instructions in this post but still I got the error.

Does anyone know of either an alternative to using rbash to restrict users which would allow me to let the user run this script, or does someone know of a way that will let him ruhn this script?

Thanks

  • You could set up a sym-link to the file. – ctrl-alt-delor Jan 25 '15 at 22:16
  • I think I may me wrong about syslinks, If so a hardlink will work. – ctrl-alt-delor Jan 25 '15 at 22:20
  • @richard I made a hardlink but it does not run the same as it does when run it in my own account. Do you have any idea why this would be? – user100599 Jan 25 '15 at 23:18
  • Has it got configuration files in same directory? In the name the same? – ctrl-alt-delor Jan 26 '15 at 21:51
  • Do you have to restrict him? You can use permissions on the rest of the system to prevent access. Though this is a bit more tricky. – ctrl-alt-delor Jan 26 '15 at 21:53
2

If you're jailing the user, you should probably just give him a copy of the script. If you set him up with a chrooted account, he wouldn't see anything outside of his home directory.

  • I would have done this but the scrip needs to CD into another HDD and run a server starting script in there. Do you have any other solutions? Thanks – user100599 Jan 25 '15 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy