How to create a system user that can access all users public_html folder

tomsema

New member
Joined
Dec 11, 2017
Messages
1
Hi Folks,

I'm working on Implementing CI/CD in my system. I have several websites in DA from different users. In order to automatically create and deploy my websites I'm using the DA API combined with a gitlab ci shell script whichlogs in with ssh using a linux user named gitlab and pulls the git repository of a particular website to the latest version. I've succesfully created a gitlab user and I've managed to write a script who is capable of pulling those repositories. The thing I'm strugling with right now are the permissions. Each website has it's own user and in order to upgrade the repository to the latest version I need access to the home directories of the corresponding users. I tried to change the permissions using linux acl, but without success.

Anyone who has experience with this?

Regards,

Reinier
 
Hello Reinier,

Directadmin uses strict permissions for user homes and files. In this case the simplest solution would be to use su/sudo and run git command in behalf of the user which are going to update.

So in general

- run a script as root
- get list of users
- su/sudo as user to run git within a loop
 
Back
Top