diff --git a/templates/Dockerfile.j2 b/templates/Dockerfile.j2
index 7160e96b38a9d499988608211d3fb1d8c54e573d..2113740e4d49bf907b7756eb9d1e347346ac72ad 100644
--- a/templates/Dockerfile.j2
+++ b/templates/Dockerfile.j2
@@ -17,9 +17,6 @@ COPY ./ssh_config /root/.ssh/config
 COPY ./id_rsa /root/.ssh/
 {% endif %}
 
-# Change files owner to solve a Docker error when copying (`failed to copy directory: Container ID <id> cannot be mapped to a host ID`).
-RUN chown -R root:root /opt/odoo
-
 # Add addons.
 ARG SAVE_COMMITS_FILENAME='custom_addons'
 RUN echo 'info: getting Odoo modules...' \