permission denied

cancel
Showing results for 
Search instead for 
Did you mean: 
marat
Active Member

permission denied

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

3 Replies
afaust
Master

Re: 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.

Upladder
Active Member II

Re: permission denied

How to solve it if the current user is alfresco?

abhinavmishra14
Advanced

Re: permission denied

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

https://github.com/abhinavmishra14/change-acs-share-port-demo/blob/master/configs-to-override/alfres...

 

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

To build and launch containers use following command:

docker-compose -f ./docker-compose.yml up --build

~Abhinav
(ACSCE, AWS SAA, Azure Admin)