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
Insufficient permissions on /data volume #39
Comments
@bertsky Here is the permission problem what i mentioned in our dev meeting last week. Do you have any idea? |
Yes.
Not necessarily: we do pass the current I don't know how specifically Kitodo then proceeds to create all the files under
Yes, that's odd. It works in my (also non-default) case:
Perhaps the (Mine is 4.2.1) |
Another possible explanation: you still have some prior definitions of these variables in your shell. Since in the Makefile we only define these as opt-in… …any shell env value would override them. |
Oh yes that is the reason! If I use only Kitodo.Production without the OCR-D implementations i run also in the permission problems so therefore I will adapt the permissions analogous the OCR-D services to fix it for all usages.
I use 4.2.1 too. |
For example, this could have happened if you ever sourced your |
Yes. In my these variables are not defined in shell before using make. |
I don't include using source and i used new terminal too. |
Could be in .bashrc though. So there is no |
Ah, you answered that one above already. |
I think Cause in my local (atm) make "info" target, env values are defined by make correctly.
|
It's hard to think how it actually could, though. What does It could still be some .bashrc thing. Your terminal's shell might be differently initialized than the bash which make is invoking... |
Same. I overlooked that |
Do you happen to have a Also, for diagnostics, could you add the following recipe lines to echo UID=$$MANAGER_ENV_UID GID=$$MANAGER_ENV_GID |
No
Change results in following output:
|
Ok, so the problem is not on make's side, the variables do get exported. You are absolutely sure the Container was started afresh (not from a stopped earlier instance)? (Try: docker stop kitodo_production_ocrd_ocrd-manager_1
docker container rm kitodo_production_ocrd_ocrd-manager_1
make start
docker inspect kitodo_production_ocrd_ocrd-manager_1 | grep -e UID -e GID ) |
Yes i'm absolutely sure that the Container is fresh. I checkout fpr test purposes your PR and run a new setup an for with explicite docker-compose build --no-cache. In addition I have also executed the script. I only had to replace the container name because it is different for me. After running application i got following result:
|
Mysterious! What versions do you use? (I have docker-compose 1.29 und Docker 20.10. But the |
Yes it is! My versions are Docker Compose Version 2.9.0 and Docker Version 20.10.12. |
Ooof. I thought the latest is 1.29 (since this is the most recent version on PyPI, and the most recent I can get Could you elaborate where you got your compose from (and which you are referring to, |
I installed both from the |
Okay, regardless how and why on your system the official Docker repo offers a more up to date version of I think this warning (fixed here) might be the clue. Could you please try updating to either 2.10 or downgrading to 2.8? |
Upgraded
|
Yes |
Seems to work with new Docker Compose version so i close this issue. |
I am starting a project from scratch (make clean, make prepare, make build, make start) with normal user inside docker group.
Following error occurs in the OCR-D Manager when running the ocr script in Kitodo.Production.
today at 12:48:25Sep 1 10:48:24 ocrd-manager for_production.sh: insufficient permissions on /data volume
The data permissions and user group assignments are following in "kitodo" directory. For the OCR-D Manager only the "metadata" directory is mounted:
I think unzipping the resource data.zip explains the rights of files and directories that are not root. So i can change them to root but i wonder why the files and directories run on the root user. Cause with our UID and GID implementations the files and directories should have the current user and group as owne.
In my case current user id is "946828167" and group id "946800513" and for root user id is "0" group id "0".
When i go into the OCR-D Manager container UID and GID have the default value "1001" of
.env
file. So it seems env variables are not set correctly and probably root is then the fallback.When i print the environment variables of Makefile following output is generated:
docker inspect kitodo_production_ocrd-ocrd-manager-1
shows that env variables are not replaced with environment variables defined in Makefile.The text was updated successfully, but these errors were encountered: