我是docker
的新手,我正在尝试将我的dockerized mongodb
连接到位于/data/db
的本地和以前的数据目录,然后我看到here The host machine volume directory cannot be under /Users (or ~).
因此,我将之前的/data/db
移至/Users/ComputerName/Docker/Mongo/data/db
和chown
目录至ComputerName
,并将权限更改为777
然后运行< / p>
docker run -p 27017:27017 -v /Users/ComputerName/Docker/Mongo/data/db:/data/db --name mongo -d mongo mongod --smallfiles
我仍然会收到以下错误:
chown: changing ownership of '/data/db/_mdb_catalog.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-0--2573889005034950089.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-0-172311321946494465.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-0-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-0-7557672013303810902.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-0-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-10-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-11-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-13-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-13-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1437-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1439-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1441-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1443-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1446-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1450-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1452-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1454-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1456-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-1459-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-15-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-15-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-17-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-19-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-19-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2-5057819112596801042.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2-8264987329754823755.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2059-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2061-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2063-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2066-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2068-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2070-8691005967059534031.wt': Operation not permitted
chown: changing ownership of '/data/db/collection-2072-8691005967059534031.wt': Operation not permitted
答案 0 :(得分:0)
你用-R修饰符改变了chmod吗?您也可以尝试将您的帐户名称添加到泊坞窗组。 - usermod -a -G docker