docker-compose runs for the yml file in /home/mac as follows:
docker-compose -f /home/mac/vscode.yml build
however gives a permission denied error within /home/mac/.config/ folder:
docker-compose -f /home/mac/.config/vscode.yml build
Error is:
ERROR: .PermissionError: [Errno 13] Permission denied: '/home/mac/.config/vscode.yml'
There seems to be a similar problem to what Jamshaid stated below:
https://stackoverflow.com/a/64585125/393171
So I have given 777 permission to both mac and .config folders; but still doesn't work.
drwxrwxrwx 20 mac mac 4096 Oca 26 22:25 mac
drwxrwxrwx 23 mac mac 4096 Oca 26 22:26 .config
Another strange thing is that this works fine with docker compose command
docker compose -f /home/mac/.config/vscode.yml build
Docker version 20.10.23, build 7155243
docker-compose version 1.29.2, build unknown
But I need to make docker-compose run because Visual Studio Code uses docker-compose in Dev Containers extention.
So may anyone help me figure out what kind of a problem is this? :)
I use Ubuntu 22.04.1 LTS.
Related
My issue:
I need to compile a Go application from Windows (current workspace) to Linux (deployment environment), I've try several times using few techniques described in this platform and many more and nothing help, everything looks fine but isn't work.
I'm compiling for linux using this script in windows
$ set GOARCH=amd64
$ set GOOS=linux
$ go build app_name.go
in the cmd folder I can find a file named app_name with no extension, which should be fine.
Then, I receive an error when trying to execute the binary in Linux, using few ways
$ ./app_name
-bash: ./app_name: Permission denied
$ source app_name
-bash: source: app_name: cannot execute binary file
this is the file that I received after the compilation:
-rw-r--r-- 1 xxx xxx 7313830 Jan 26 16:59 app_name
If I run the application in windows with go run -arguments app_name.go it works perfect, but the issue appear after compile or try to compile the app for linux, I can't run the app even as root
On Unix systems, a file must have the executable bit set in order to be able to be run. This is the only way that the system knows what programs or scripts can be run, and differs from Windows, which uses extensions.
In this case, you need to change permissions by running chmod u+x unified_mapper before trying to execute it. If you want other users to execute it as well, you can do something like chmod 755 unified_mapper. Run man 1 chmod in the manual page to see more details about possible invocations.
I am cross-compiling a project on my desktop, and installing it on a device which is mounted via ssh, using sshfs, like so:
sudo sshfs -o allow_other -o follow_symlinks user#192.168.12.100:/ /mnt/remote
The build is successful, but when I try to "sudo make install", I receive the following message:
-- Installing: /mnt/remote/usr/lib/libprop.so.5.1.5
-- Installing: /mnt/remote/usr/lib/libprop.so.5
CMake Error: failed to create symbolic link '/mnt/remote/usr/lib/libprop.so.5': i/o error
CMake Error at cmake_install.cmake:176 (file):file INSTALL cannot duplicate symlink
"/home/ubuntu/libprop/build/lib/libprop.so.5" at
"/mnt/remote/usr/lib/libprop.so.5".
The library and the symlink are copied and created. That is, it seems that the installation actually succeeds, but CMake thinks otherwise.
The filesystem is not ro, as can be seen in mount output:
user#192.168.12.100:/ on /mnt/remote type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
And I can see the entry under /mnt/ (I chown'd and chmod'd it for user access, thinking it might solve the problem):
drwxrwxr-x 1 ubuntu ubuntu 4096 Mar 11 13:43 remote
and I can access it event without root permissions, copying and deleting files without a problem.
This process has been working for me. I have no idea what was changed that it stopped. Could be something in my environment or maybe in the destination platform.
I would be grateful for any assistance.
OK, I have found the problem... I shouldn't be using -o follow_symlinks. I guess this can cause other problems (I used it for a reason), but for the purpose of compiling and installing, it works.
I have installed SDKMan on my Oracle Linux 6.9 server. And then installed Java and Jenkins. I created symlinks for /usr/bin/java and /usr/bin/javac.
When I try starting the Jenkins service: sudo service jenkins start
I get error saying: Starting Jenkins bash: /usr/bin/java: Permission denied
This is the executable:
lrwxrwxrwx 1 root root 54 Dec 8 00:07 /usr/bin/java -> /home/user/.sdkman/candidates/java/current/bin/java
What am I missing here?
OK solved this now. I had to change the JENKINS_USER (in /etc/sysconfig/jenkins) from jenkins to root in my case. As per the instructions here changing the user should be accompanied with changing ownership of /var/lib/jenkins, /var/log/jenkins, /var/cache/jenkins (which in my case was already root).
I am new to Go, and I have a docker plugin written in Go on my MAC. I build it with the following command:
env GOOS=linux GOARCH=amd64 go build
The output is binary file. When I copy it to CoreOS and try to execute:
./my-binary-file
the result is:
"2016/12/07 08:05:00 Error Group root not found"
The OS on which file is executed is CoreOS. I've checked MAC and CoreOS, both of them are x86_64.
Why then I get this error?
EDIT:
The problem was in ServerUnixGroup. It should be "docker" instead of "root".
The problem was in ServerUnixGroup. It should be "docker" instead of "root". – user2739823
I'm new to Sonar, and i was trying to install Sonar 2.8 on my server (Linux 64 on HP-UX)
When i tried to launch it (sonar.sh start) i got the following message
[myHomeDirectory]/sonar/2.8/bin/linux-x86-64/./wrapper: Execute permission denied.
what drives me crazy is that i've putthe whole package on 777 permissions, so i really don't understand what's exactly happening.
Can anyone help with this please ?
Thanks in advance !
I hit a similar issue hence why I came to this post. I was attempting to install SonarQube's scanner in a Docker container but when I was running it, I was getting something along the lines of:
/root/sonar-scanner-2.6.1/bin//sonar-scanner: 103: exec: : Permission denied
I had given the whole /root/ folder all permissions so I was curious about the permission denied. In the end for me it wasn't anything to do with permissions. I simply needed to RTFM.
Sonar-scanner needs a JRE to run and my Docker container didn't have one installed. So if anyone else does the same thing as me, I hope this saves you a few minutes of head scratching.
Not really convinced in the way you are launching it. To get Sonar running I recommend running it on tomcat, providing you just want to use the default database that comes with Sonar. The steps would be:
Install Tomcat
Navigate to your /war directory within your sonar instance and run the command: $] ./build-war.sh.
When this finishes you should see a sonar.war file in the same directory.
Rename the war file ROOT.war instead of sonar.war: $] mv sonar.war ROOT.war
This ensures that sonar runs on tomcat's default port.
Move the war file into the tomcat webapps directory: $] mv ROOT.war /tomcathome/webapps
Navigate to the tomcat /bin folder and run the command $] ./catalina.sh start
Type your server hostname in your browser with a port :8080 at the end and you should see sonar running.
These steps will have sonar running on the default database, though. If you want a MySQL database i'd look at sonar tutorials on how to do that.
I finally came out with the conclusion that the binary file (wrapper) is simply not compiled to run under HP-UX
when launching a file command on wrapper under a Linux i get : <ELF-64 executable object file> which doesn't match the <ELF-64 executable object file - IA64> required by HP-UX running on a Itanium processor
Please check if you have java installed on the machine. Java should be installed on the machine before running sonar-runner.
Use this to check java : java -version