I installed alfresco using docker .
And now i need to edit server.xml file.That file as far as i understand is on disk. opt/tomcat/conf
But when i try to enter the folder conf it is written permission denied.
How can i enter this folder?I use root login.
organization@administration:/opt/tomcat$ cd /opt/tomcat/conf
-bash: cd: /opt/tomcat/conf: Permission denied
When you enter the container created from the default Alfresco image, you are actually NOT running as root but rather use the default user as specified in Alfresco's image, which is "alfresco", and that user does not have access to the specified path. Also, your shell prompt does not look like you are actually working in the Docker container - a Docker prompt typically does not contain the "organization@administration:" that is visible in yours - to me it rather looks like you are working on your host instead of the actual Docker container, and that you are not really a root on the host but a special administration user, which may have "some" elevated permissions but possibly not the full "root" access.
How to solve it if the current user is alfresco?
Even though you are able to update the server.xml by connecting to container, the changes will be lost if you terminate the container.
There is a better way to update the server.xml. Use the DockerFile and docker-compose.yml in combination to build the custom image that contains your custom changes.
Here is an example:
https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/docker-compose.yml#L15
Use following command to build the image:
docker-compose -f ./docker-compose.yml build
Use following command to launch the containers:
docker-compose -f ./docker-compose.yml up
docker-compose -f ./docker-compose.yml up --build
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.