Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3260

General Questions • [Software] A question about permission

$
0
0
Hello,
I installed Gitlab Runner and after installation I did the following steps:

Code:

$ sudo usermod -aG docker gitlab-runner$ sudo nano /etc/sudoersgitlab-runner ALL=(ALL) NOPASSWD: ALL
Containers and source repositories are located in another partition and the directory permission is as follows:

Code:

# ls -ltotal 20drwxrwxr-x 5 root root  4096 Apr 22 09:22 partitiondrwxrwx--- 2 root root 16384 Apr  9 16:50 lost+found
With this permission the runner cannot work and I have to use the following command:

Code:

# chown -R gitlab-runner /mnt/partition
The problem will be solved, but I heard that this will cause problems in the future.
I did the following step:

Code:

# chown -R root /mnt/partition# groupadd runner# /sbin/usermod -a -G runner gitlab-runner# /sbin/usermod -a -G runner root# chgrp -R runner /mnt/partition/# chmod -R g+rwx /mnt/partition/
After this, the runner can't copy files in the directory again.
The content of the .gitlab-ci.yml file is as follows:

Code:

stages:  - build  - deploybuild-test:  stage: build  script:    - rm -rf node_modules    - mkdir -p node_modules/    - rm -rf /mnt/partition/containers/test    - cd /mnt/partition/containers/    - git clone http://jason:PASS@192.168.1.2/project/test.gitdeploy-test:  stage: deploy  script:    - cd /mnt/partition/containers/YAML    - docker compose up -d test
What is wrong?

Thank you.

Statistics: Posted by jasonnix — 2024-04-26 16:26 — Replies 5 — Views 97



Viewing all articles
Browse latest Browse all 3260

Trending Articles