PlusMinus0 / headless-jd2-docker

Headless JDownloader 2 Docker Container
31 stars 38 forks source link

Downloaded files are owned by root:root #1

Closed PlusMinus0 closed 7 years ago

ArgonQQ commented 8 years ago

In which way is this bad?

PlusMinus0 commented 8 years ago

It is not bad per se. There's just no way, to change the owning user if you wanted to.

ArgonQQ commented 8 years ago

You could create a new folder and set the GID Sticky bit. So everything in the Download folder is owned by a specific group. Should solve your problem.

nopain1981 commented 8 years ago

it's for sure possible to use another user to execute the java .... =) >

[root@server cfg]# docker exec -it jd2 /bin/bash root@server:/# ps -ef | grep java root 19 17 0 20:38 ? 00:00:00 su -pc java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar swuser swuser 21 19 0 20:38 ? 00:00:00 sh -c java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar swuser 22 21 0 20:38 ? 00:00:05 java -Djava.awt.headless=true -jar /opt/JDownloader/JDownloader.jar root 214 198 0 20:52 ? 00:00:00 grep java root@server:/#

if you wish, you can check > https://github.com/nopain1981/homeserver/tree/master/INSTALL/jd2

PlusMinus0 commented 8 years ago

@nopain1981 The reason why I didn't change it was that I wanted to pass the GID and UID to the docker as it is created. It seemed like something that is preferable over needing to fork the container whenever you want another user.

mr-bolle commented 7 years ago

Hi @PlusMinus0,

now i found maybe a solution. I create into the Container a new User and if you run the Container and share the Download Folder with your Host, the downloaded Files owned by the Docker User.

Fork headless-jd2-docker from PlusMinus0

PlusMinus0 commented 7 years ago

Thanks for the hint, I merged gotofoo’s fork.