P
P
Pegas123452022-02-04 22:17:36
Jenkins
Pegas12345, 2022-02-04 22:17:36

Running Jenkins command as user?

Greetings!

Question about Jenkins, I can't find any info about it. Please tell me how to make Jenkins have users, and give these users the right to execute commands and accesses on their behalf in Linux. For example, if there is a user 'vasya', so that he has access to his / home / vasya folder, can create files for himself, and the created files belong to him 'vasya', if he executed scripts, etc., also on his own behalf . So are other users. There was an opportunity to see each his own and do what is necessary there, with his files.

Now Jenkins runs as the jenkins user, creates everything on its own behalf and cannot copy something from its workspace to the /home/vasya folder.

Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitsliputsli, 2022-02-05
@Vitsliputsli

And here Jenkins? OS users are managed by the OS. You can use sudo to run commands as another user on GNU Linux, or the users must be in the same group and the directory has group write permission.
Another thing, why does Jenkins need to copy something in the directories of other users? What kind of files does he upload to Vasya?

P
Pegas12345, 2022-02-05
@Pegas12345

In fact, this is the task. There is a web server with subdomains
vasya.name.ru
petya.name.ru
...
misha.name.ru
Virtual hosts are configured for each domain. One user is responsible for each domain. Ssh access is closed. It is necessary that each user has the opportunity to work only in his own folder (his own domain), one does something on the python, the second on something else, and so on.
Someone downloads something on the git, someone just makes backups there, copies something somewhere, etc.
Access only via Jenkins.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question