When I try to run my gitlab-ci.yml, I got this error ?
Has anyone have any idea?
Thank you
The Error: mkdir command fails.
mkdir is a Linux/iOS command that creates a new directory.
When it throws the error:
Permission denied
it tells that the user running that command (the user executing the script or running the process) has no rights to create a directory in
/Users/nawinpoolsawad/builds/pxKER6-V/0/bitnance-exchange/exchange-ios.tmp
To fix the issue, change permission of the directory /Users/nawinpoolsawad/builds/pxKER6-V/0/bitnance-exchange/ and its parents or execute that application/script with another user (eg root).
Related
I had to change my username and home dir , after changing,upon startup I am still receiving an error and docker daemon fails to start.
Docker tries to use the old home directory and has a fatal error resulting in the app crashing
Docker uses the correct home directory and starts after a clean install
I found a solution ,
I changed the dataFolder in the ~/Library/Group\ Containers/group.com.docker/settings.json file to the new user name and start Docker Desktop again.
I have a set of docker run commands in my sudoer file. Some of the commands work fine with sudo, but others are not being accepted with statement "Sorry, user xxx is not allowed to execute '/bin/docker run ....'
A few things to note:
Script syntax is just "sudo docker ...", sudoer file command syntax is "/usr/bin/docker" but for some reason the message is using "/bin/docker"
the command that has the error seems to also only appear with error "Error: no such container..." after the sudo error message
There were new line characters in the sudoer file it was believed.
I am setting up CI/CD pipeline in gitlab. I have self hosted gitlab version 11.4 running on my server. I am using shell executer for gitlab-runner instance. In my source code, there is a docker-compose.yml file which has 8 different containers (mysql, elasticsearch, php, nginx, queue).
When i push new code, it triggers defined pipeline and stopped with following errors
Running with gitlab-runner 11.6.0 (f100a208)
on iZAPLabs runner 9a639f82
Using Shell executor...
Running on ip-10-250-142-190...
Fetching changes...
warning: could not open directory 'docker/.data/db/ginvoicing_dev/': Permission denied
warning: could not open directory 'docker/.data/db/mysql/': Permission denied
warning: could not open directory 'docker/.data/db/performance_schema/': Permission denied
warning: failed to remove docker/.data/redis/dump.rdb: Permission denied
warning: failed to remove docker/.data/db/ib_logfile0: Permission denied
warning: failed to remove docker/.data/db/ginvoicing_dev: Permission denied
warning: failed to remove docker/.data/db/ibdata1: Permission denied
warning: failed to remove docker/.data/db/auto.cnf: Permission denied
warning: failed to remove docker/.data/db/mysql: Permission denied
warning: failed to remove docker/.data/db/performance_schema: Permission denied
warning: failed to remove docker/.data/db/ib_logfile1: Permission denied
warning: failed to remove docker/.data/elasticsearch: Permission denied
warning: failed to remove docker/var/run/php: Permission denied
ERROR: Job failed: exit status 1
.data directory has docker volumes mounted in the different containers. But i don't know why new push is trying to remove them. I even try to use "cache" directive. But no luck.
Any help would be appreciated.
I guess the gitlab runner itself is running as user git or gitlab or gitlab-runner or something like that (Just put whoami in the script section to determine if you don't know).
Most of your docker containers are running as root user inside the container. So everytime you use a volume which is located inside your git repository, the permission will change when your containers are changing the data. After your containers were stopped, you gitlab user is not able to clean up the repository for a new job.
Some ideas (but maybe no one will solve your problem)
a) add your gitlab runner user to the docker group
b) try to run sudo git reset --hard
c) mv the location of your docker volumes to outside your repository, maybe to /tmp (and don't forget to delete them after the job is done).
Upon execution a deploy to a server for a specific application, the process interrupts at this stage
DEBUG [88db4789] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.4" ; /usr/bin/env mkdir -p /var/www/v4/shared /var/www/v4/releases )
DEBUG [88db4789] mkdir:
DEBUG [88db4789] cannot create directory â/var/wwwâ
DEBUG [88db4789] : Permission denied
Note: this occurring only for this particular application. Another application that deploys to the same server processes past this stage
I have attempted to change ownership as suggested here, but that fails
chown: cannot access â/var/www/â: No such file or directory
so I am led to believe a configuration issue is the culprit. Aside from the environment data
server 'xx.xxx.xxx.xxx', user: 'deploy', roles: %w{db web app}
where have I missed something?
Your server instance does not have the folder /var/www, so you can do manually by ssh to that server as user deploy then try to make the folder yourself.
I think it again will fail because of your deploy user does not have the rights to /var folder. Try to change the ownership following the guide you have to do so.
While yeuem1vannam's answer is valid, this use case actually had a different problem in the deploy.rb file. The path specified there had an error in the user name, thus the permission error to create the folder upon deploy.
Am writing a script which creates a directory but when i tried (Ruby script running on windows)
destination = "path to the folder"
FileUtils.mkdir_p destination
it gives me an error saying Permission Denied (Errno::EACCES) at mkdir_p
Any help is appreciated . Thank you
open your cmd terminal with administrator privileges, and then run the script again. It seems like your folder is in a place that need admin privileges, so you can create it. Also add it to your script:
require 'win32ole'
shell = WIN32OLE.new('Shell.Application')
shell.ShellExecute('path_to_ruby_program', nil, nil, 'runas')
And see this two questions:
Run ruby script in elevated mode
Detect if running with administrator privileges under Windows XP