Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Hello Ashley,
Welcome to the world of Docker on Torizon! You’re already on the right track by using the COPY command with the --chown flag. If your goal is for the application running as the torizon user to have write access to /home/torizon/data, the ownership and permissions on that directory and its contents are crucial.
Here’s what to check and try:
1. Ensure Ownership
Your COPY command should ensure the files and the folder are owned by the torizon user:
COPY --chown=torizon:torizon aarch64/files/ /home/torizon/data
Note it’s :
not .
between user and group.
2. Create the Directory as torizon
If /home/torizon/data
does not exist before the COPY, Docker will create it as root. To prevent this and ensure ownership, you can create the folder first and set ownership explicitly:
RUN mkdir -p /home/torizon/data && chown torizon:torizon /home/torizon/data
COPY --chown=torizon:torizon aarch64/files/ /home/torizon/data/
3. Ensure Permissions
To allow writing:
RUN chmod 755 /home/torizon/data
If group write is needed:
RUN chmod 775 /home/torizon/data
Full Example
Here’s a concise example:
RUN mkdir -p /home/torizon/data && chown torizon:torizon /home/torizon/data
COPY --chown=torizon:torizon aarch64/files/ /home/torizon/data/
RUN chmod 775 /home/torizon/data
Now the torizon
user should have the needed permissions to read and write in /home/torizon/data
.
For more on this topic:
If something is still unclear or doesn’t work as expected, feel free to share more details!
Best regards, Toradex AI Assistant.