R
R
Roman Basharin2016-09-28 18:30:56
git
Roman Basharin, 2016-09-28 18:30:56

How to allow the user only some console commands?

Hi friends. Created for one of the employees access to the server using proftpd, the configuration is presented below:
username:$1$x6zKJYsy$7B.MdZgxttkHfd7OtnS1y/:33:33::/var/www/hell/kart:/bin/false
The task was: to provide space to upload files to the server, but forbid the use of the console for server security purposes. The employee uploaded the files manually and could test the application no longer on the local machine, but on the work machine. There are a lot of files, besides, with media, stupid copy-paste leads to a 10-minute wait for copying, when in fact only a few files were changed.
Question: is it possible to allow a user on the server to use only certain console commands? For example only: ls, cd, git. It is not reasonable to pull from the bitbucket every time at his request. Hooks will not work, because not every commit needs to be uploaded to a test server.
ps I know about hooks only in theory what they are, but I don’t know how they are written

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
romy4, 2016-09-28
@Hellek

You can do a chroot for it with all the consequences.

O
Oleg Tsilyurik, 2016-09-28
@Olej

but forbid using the console for server security purposes.

And what kind of security or lack of it will be from a user who does not know the root password and who is not allowed to sudo?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question