Need mkdir permission for EC2 docker container

I have a docker-compose which runs 3 containers:

selenium/hub

selenium/node-chrome

My own image of a java program that uses the 2 above containers to log into a website, navigate to a download page, click on a check-box, then click on a submit button, that will cause a file to be downloaded.

Everything runs fine on my pc, but on an EC2 instance the chrome node gets the error:

mkdir: cannot create directory ‘/home/selsuser’

and then other errors trying to create sub-directories.

How can I give a container mkdir permissions?

I would like to run this as an ECS-Fargate task, so I would also need to give a container mkdir permissions within that task.

Thanks

@FreiburgBill Welcome to the cloudonaut community! :wave:

I need more information to help you with your issue. How does the ECS task definition look like? How do you launch the ECS tasks? Did you use any of our templates? If so, which ones?

Hi Andreas,

Thank-you for taking time to answer!

If you are busy, you can stop reading now. I did make it one step farther and will keep working on it.

I will probably write you a new question later.

If you have time, here is what the situation is:

I currently have a docker-compose file that launches 3 containers (see attached file):

  1. selenium/hub
  2. selenium/node-chrome
  3. My own image of a java program that uses the 2 above containers to log into a website, navigate to a download page, click on a check-box, then click on a submit button, that will cause a file to be downloaded.

It was running fine on my Windows PC, but when I tried to run it on an EC2 instance I noticed the chrome node was getting an error trying to mkdir /home/seluser and was not downloading the file I wanted.

I now have that problem solved. I created a new user on the EC2 “seluser”, which created a /home/seluser, which then made the chrome node

mkdir error go away, but I still could not find the downloaded file. I then added the seluser to the EC2 docker usergroup, and opened up the rights on /home/seluser and /home/ec2-user. I maybe should create a new EC2 and make sure I can reproduce exactly what I need to do, but it is now working!

YEAH! But that was only a small stepping stone.

The goal is to have this run as an ECS-Fargate Task.

I have already created a task that worked uptil trying to find the downloaded file.
(Is there a way to download a ECS Task definition, so I can send it to you??)
All three nodes started and did their needed connections.

A desired website was logged into, navigated to a download page, clicked a check-box, and clicked the submit.

But could not find a downloaded file.

So this is now the next challenge that I will work on.

I do not want to waste your time at this point. I will beat my head against it a bit more, and then if needed contact you again with how far I got.

If you do have any suggestions that would be great.

If needed I will try to use an EFS volume, but I would rather do it without one.

Thanks for your time.

I will be in touch!

Bill

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.