Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker install problem #288

Open
chuangtim opened this issue Dec 2, 2018 · 1 comment
Open

docker install problem #288

chuangtim opened this issue Dec 2, 2018 · 1 comment
Labels

Comments

@chuangtim
Copy link

chuangtim commented Dec 2, 2018

Hi.I install it from docker hub and execute the following command with root

docker run -it
-v "/data/mongobackup/conf:/conf:Z"
-v "/data/mongobackup/data:/var/lib/mongodb-consistent-backup:Z"
-v "/data/mongobackup/logs:/var/log/mongodb-consistent-backup:Z"
perconalab/mongodb_consistent_backup:latest --config=/conf/mongodb-consistent-backup.conf

The error is as follows

Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 349, in execute
File ".bootstrap/_pex/pex.py", line 90, in _activate
File ".bootstrap/_pex/environment.py", line 151, in activate
File ".bootstrap/_pex/environment.py", line 199, in _activate
File ".bootstrap/_pex/environment.py", line 140, in update_candidate_distributions
File ".bootstrap/_pex/environment.py", line 111, in load_internal_cache
File ".bootstrap/_pex/environment.py", line 98, in write_zipped_internal_cache
File ".bootstrap/_pex/util.py", line 178, in cache_distribution
File ".bootstrap/_pex/common.py", line 141, in safe_open
File ".bootstrap/_pex/common.py", line 129, in safe_mkdir
File "/usr/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib64/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib64/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mongodb-consistent-backup/.pex'

Thanks
chuangtim

@timvaillancourt
Copy link
Contributor

timvaillancourt commented Dec 7, 2018

Hi @chuangtim, try running this as the user that owns /data/mongobackup (see --user flag).

I believe /data/mongobackup is owned as a different UID than the tool expects:

docker run -it --user=$(id -u)
-v "/data/mongobackup/conf:/conf:Z" 
-v "/data/mongobackup/data:/var/lib/mongodb-consistent-backup:Z" 
-v "/data/mongobackup/logs:/var/log/mongodb-consistent-backup:Z" 
perconalab/mongodb_consistent_backup:latest --config=/conf/mongodb-consistent-backup.conf

You could also 'chown' /data/mongobackup to match the default UID the docker container runs as (probably 1000).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants