does anyone know why is jenkins unable to run this file and gives a no such file or directory error ?
the file is there. it has the following permissions :
root#ott-ci-01:/usr/local/lib/android-sdk-linux/build-tools/17.0.0# ls -la /usr/local/lib/android-sdk-linux/build-tools/17.0.0/aapt
-rwxr-xr-x 1 root root 1122758 Jun 17 10:07 /usr/local/lib/android-sdk-linux/build-tools/17.0.0/aapt
any ideas ?
Related
I created a new VM with ubuntu 22.04 and asked to install docker
When I create a docker-compose file and having to run the build, the following errors occur:
pilati#ubuntu-web-containers:/var/www/mysql$ ls -la
total 12
drwxr-xr-x 2 root root 4096 out 1 16:42 .
drwxr-xr-x 4 root root 4096 out 1 16:40 ..
-rwxrwxrwx 1 root root 473 out 1 16:42 docker-compose.yml
pilati#ubuntu-web-containers:/var/www/mysql$ sudo docker-compose build
ERROR:
Can't find a suitable configuration file in this directory or any
parent. Are you in the right directory?
Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
pilati#ubuntu-web-containers:/var/www/mysql$ sudo docker-compose -f /var/www/mysql/docker-compose.yml build
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: '/var/www/mysql/docker-compose.yml'
pilati#ubuntu-web-containers:/var/www/mysql$
I reinstalled the VM from scratch and nothing works.
Any way to solve this problem?
Put your compose to your home folder, it should work from there. That is because you installed docker with snap, install it as is from the official site.
I'm using bazel to run a go test, and in that docker_test.go file I'm using docker go sdk's ContainerCreate function to mount the local dir to docker. In the BUILD.bazel file, I'm writing
go_test(
name = "docker_test",
size = "enormous",
srcs = ["docker_test.go"],
embed = [":docker"],
data = glob([
"docker-entrypoint-initdb.d/**",
]),
deps = [
"//pkg/util/contextutil",
"//pkg/util/log",
"#com_github_docker_docker//client",
"#org_golang_x_net//context",
],
)
With "docker-entrypoint-initdb.d/**", exactly the folder that I'll mount to my docker container.
And I use bazel to run this go test, and the container is successfully started. I used docker exec -it ... /bin/sh to enter the cli, and in that cli it gave the following confusing results:
sh-4.4# cd docker-entrypoint-initdb.d/
sh-4.4# ls
foo.txt hello.sql yes.sql
sh-4.4# cat ./hello.sql
cat: ./hello.sql: No such file or directory
sh-4.4# ls -al
ls: cannot access 'foo.txt': No such file or directory
ls: cannot access 'hello.sql': No such file or directory
ls: cannot access 'yes.sql': No such file or directory
total 4
drwxr-xr-x 5 root root 160 Nov 28 22:57 .
drwxr-xr-x 1 root root 4096 Nov 28 22:57 ..
l????????? ? ? ? ? ? foo.txt
l????????? ? ? ? ? ? hello.sql
l????????? ? ? ? ? ? yes.sql
sh-4.4#
So it turns out that the folder I wanted seems successfully mounted to the docker container, but when I tried to look at the files inside, it somehow gave me "No such file or directory". But these files are actually there in the ls's output! I'm so confused about this.
Trying to lock a file in RHEL but seeing following issue
Stopped the services
service rpcbind stop
service nfslock stop
rm -rf /var/lib/nfs/statd/sm/*
rm -rf /var/lib/nfs/statd/sm.bak/*
service rpcbind start
service nfslock start
After this I'm using C program mentioned in https://community.microfocus.com/microfocus/cobol/net_express__server_express/w/knowledge_base/6215/c-program-to-validate-nfs-locking-ability
to :-
• Open File(Create)
• Lock File
• Close File
But seeing below errors
[root#mywebappsserver shared]$ ./nfs_lock
FATAL ERROR: Could not lock file
Even after restarting rpcbind and nfslock not seeing any entry under
# ls -l /var/lib/nfs/statd/sm/
Need your help in same
Fixed it after changing /var/lib permissions
Before:-
ls -ld lib
drwx------. 34 root root 4096 Jul 7 08:32 lib
After:-
ls -ld lib
drwxr-xr-x. 34 root root 4096 Jul 7 08:32 lib
This is the list of user permissions after logging them to the terminal:
➜ ~ ls -ld / /usr /usr/bin /usr/bin/manpath
drwxr-xr-x 33 root wheel 1190 Nov 14 08:49 /
drwxr-xr-x# 11 root wheel 374 Nov 7 09:12 /usr
drwxr-xr-x 1055 root wheel 35870 Nov 12 11:34 /usr/bin
lrwxr-xr-x 1 root wheel 3 Nov 5 18:13 /usr/bin/manpath -> man
And this is the error I receive when trying to update the permissions:
➜ ~ chmod 755 / /usr /usr/bin /usr/bin/*
chmod: Unable to change file mode on /usr/bin/apropos: Operation not permitted
chmod: Unable to change file mode on /usr/bin/at: Operation not permitted
This all began as an effort to debug the following zsh error:
zsh: command not found
I have tried resetting my $PATH variable to no avail. I've uninstalled and reinstalled zsh, run brew doctor, reinstalled node, etc. and am unsure where to proceed from here. The problems I am trying to fix are two-fold:
fix the PATH so that I can use commands (e.g.: ionic) from the
terminal
fix the permissions so I don't encounter any further
errors as I troubleshoot going forward
Can anyone offer guidance? Been trying to debug this for hours.
This my current PATH:
➜ ~ echo $PATH
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I am new to Jenkins. I am trying to get it to build a project and then copy the artifacts to a particular location. I believe I have the permissions setup correctly, but I get "permission denied" errors when that build step is run.
The code is written in Clojure. Jenkins correctly pulls the code from Github. Then Jenkins runs "lein uberjar". The files are successfully created.
I have an "Execute shell" as a build step in Jenkins. The shell command is:
cp /var/lib/jenkins/jobs/api/workspace/target/*.jar /home/jenkins/api
If I ssh to the server, and sudo to root, and then su to "jenkins", I can run the above command and it works perfectly. However, when Jenkins does this, the output contains:
+ cp /var/lib/jenkins/jobs/api/workspace/target/instaphoto-0.1-standalone.jar /var/lib/jenkins/jobs/api/workspace/target/instaphoto-0.1.jar /home/jenkins/api
cp: cannot create regular file ‘/home/jenkins/api/instaphoto-0.1-standalone.jar’: Permission denied
cp: cannot create regular file ‘/home/jenkins/api/instaphoto-0.1.jar’: Permission denied
Build step 'Execute shell' marked build as failure
Sending e-mails to: developer#sunflowerforce.com
Finished: FAILURE
If I do this:
groups jenkins
I see:
jenkins : jenkins root run-server-software
and if I do this:
cd /home/jenkins
ls -al
drwxrwx--- 4 jenkins run-server-software 4096 Jul 30 20:21 .
drwxr-xr-x 8 root root 4096 Jul 30 18:59 ..
drwxrwxr-x 2 sunflower run-server-software 4096 Jul 31 01:06 api
drwxrwxr-x 10 sunflower run-server-software 4096 Jul 30 19:59 nlp
So jenkins belongs to group run-server-software and group run-server-software should have permission to do whatever it wants in folders such as api. So why do I get "permission denied"?