Permissions issues. How can I change the permissions so root does not get denied?

Keywords: Jenkins - AWS - Technical issue - Permissions
bnsupport ID: 35676bf1-376e-1b55-d05e-acb1456423a6
Description:
We are trying to run jobs and we are getting this error back

Shell Script – echo /opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bitnami/apache/bin:/opt/bitnami/apache2/bin:/opt/bitnami/common/bin:/opt/bitnami/git/bin:/opt/bitnami/gonit/bin:/opt/bitnami/java/bin:/opt/bitnami/java/jre/bin (self time 265ms)
Shell Script – export PATH=/usr/local/lib/sfdx/bin/:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bitnami/apache/bin:/opt/bitnami/apache2/bin:/opt/bitnami/common/bin:/opt/bitnami/git/bin:/opt/bitnami/gonit/bin:/opt/bitnami/java/bin:/opt/bitnami/java/jre/bin sfdx --version (self time 266ms)

  • export PATH=/usr/local/lib/sfdx/bin/:/opt/bitnami/nami/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bitnami/apache/bin:/opt/bitnami/apache2/bin:/opt/bitnami/common/bin:/opt/bitnami/git/bin:/opt/bitnami/gonit/bin:/opt/bitnami/java/bin:/opt/bitnami/java/jre/bin
  • sfdx --version
    /usr/local/lib/sfdx/bin//sfdx: line 33: cd: /root: Permission denied

This is the pipeline:

pipeline{
agent any;
stages{
stage(‘test SFDX version’){
steps{
script{
sh “echo $PATH”
sh"""
export PATH=/usr/local/lib/sfdx/bin/:$PATH
sfdx --version
“”"
}

        }
    }
}

}

Hi @nick.ohanian,

Can you check the following guide:

https://docs.bitnami.com/bch/apps/jenkins/configuration/use-custom-executable/

Regards,
Michiel

Hello Michiel,
Thank you.

I don’t see the apps folder available?

total 72
drwxr-xr-x 14 root root 4096 Aug 26 23:08 .
drwxr-xr-x 3 root root 4096 Jun 6 01:48 …
drwxr-xr-x 20 root root 4096 Jun 5 20:41 apache
lrwxrwxrwx 1 root root 19 Jun 5 20:41 apache2 -> /opt/bitnami/apache
drwxr-xr-x 3 root root 4096 Jun 5 20:41 bncert
lrwxrwxrwx 1 root root 46 Jun 5 20:41 bncert-tool -> /opt/bitnami/bncert/bncert-0.5.9-linux-x64.run
drwxr-xr-x 4 root root 4096 Aug 26 23:08 bnsupport
-rw-r–r-- 1 root root 754 Apr 15 15:51 bnsupport-regex.ini
lrwxrwxrwx 1 root root 52 Aug 26 23:08 bnsupport-tool -> /opt/bitnami/bnsupport/bnsupport-0.9.2-linux-x64.run
drwxr-xr-x 6 root root 4096 Jun 5 20:41 common
-rwxr-xr-x 1 root root 1453 Jun 6 01:49 ctlscript.sh
-rw-r–r-- 1 root root 4 Jun 22 15:07 .firstboot.status
drwxr-xr-x 8 root root 4096 Jun 22 15:06 git
drwxr-xr-x 4 root root 4096 Jun 5 20:41 gonit
drwxr-xr-x 12 root root 4096 Jun 22 15:06 java
lrwxrwxrwx 1 root root 16 Jun 22 15:06 jenkins -> /bitnami/jenkins
drwxr-xr-x 3 root root 4096 Jun 5 20:41 jenkins-swarm
drwxr-xr-x 7 root root 4096 Jun 4 17:17 nami
-rwxrwx— 1 bitnami root 100 Jun 6 01:49 properties.ini
drwxr-xr-x 3 root root 4096 Jun 6 01:49 scripts
drwxr-xr-x 2 bitnami bitnami 4096 Aug 27 14:17 stats
drwxr-xr-x 6 root root 4096 Jun 22 15:06 var
bitnami@ip-10-109-0-157:/opt/bitnami$ pwd
/opt/bitnami

https://ibb.co/P46K4g6
https://ibb.co/d6wTCzV
https://ibb.co/WBHxh6z

Hi @nick.ohanian,

I’ve not been able to reproduce the issue, following the steps in the guide. Could you try with a test script?

Regards,
Michiel

Hello,
Could part of the problem be I don’t see the app Jenkins directory when I’m logged on as bitnami? Is it ok to create it?

Hi @nick.ohanian,

The path in the guide is not correct. Our team will change the documentation. The correct path should be:

 /opt/bitnami/jenkins

Can you try adding the script there?

Regards,
Michiel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.