I ran a hub and chrome node in EC2. When I ran my download tests, I tried searching for the files that are supposed to be downloaded in my tests, usually the default download path is /home/seluser/Downloads. when i docker exec -it my chrome node and went to the directory mentioned earlier, there is no such directory. Then I ran the find command to see if my file was just in another directory but it cannot find the file. I have tried running my hub and chrome node in my macbook pro and when i run and download tests and searched for the downloaded files in chrome node, the files are in /home/seluser/Downloads. Do you have any idea why its not being downloaded in EC2?
host docker inspect:
"HostConfig": {
"Binds": [
"/home/ec2-user/selenium-downloads:/home/seluser/Downloads"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "default",
"PortBindings": {},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
is it because the mount propagation is rprivate in ec2 while in my local propagation is empty? if so, how can i change propagation?
"Mounts": [
{
"Source": "/home/ec2-user/selenium-downloads",
"Destination": "/home/seluser/Downloads",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
Hi @kariasbolster,
How are you starting the containers in the EC2 instance? Could you share the exact command you are using?
Closing this issue. It was because of folder permission.
@kariasbolster Could you elaborate? I'm having a similar issue. Did you need to set a permission on the docker container itself or the host machine?
@AlexMarchini, i did a chmod to this folder "/home/ec2-user/selenium-downloads" . It was weird why I needed to do it since as you can see from the data above the RW field is true.
@kariasbolster Thanks! Got it working.
For anyone else that runs into this, the exact command I used to set permissions was:
docker-compose exec chrome sudo chmod -R 777 /home/seluser/Downloads
@AlexMarchini thank you! you did my day happy now. it was really helpful.
Most helpful comment
@kariasbolster Thanks! Got it working.
For anyone else that runs into this, the exact command I used to set permissions was:
docker-compose exec chrome sudo chmod -R 777 /home/seluser/Downloads