Open ozdeadmeat opened 1 year ago
have also attempted to use
- "/usr/downloads:/downloads:rw"
as another volume with the same result.
Directory perms are set correctly and can write to the directory, as far as I can tell, it appears to be an issue related to the app itself not registering the drive locations as writable.
Can download to /tmp though not ideal
Looks like a permission issue. Can you share the output of:
docker exec <container name> ls -ld /storage
Also, could you share the configuration of the associated export from the NFS server ?
when in a container shell i can write to all the directories just fine. It seems to be only related to the java application.
when in a container shell i can write to all the directories just fine. It seems to be only related to the java application.
Executing command from the shell is done as root. So any permission issue might not be seen.
Instead of doing touch test.456
, try su-exec app touch test.456
.
Also, please share the export from the NFS server so we can see if it can explain the problem.
I am also available to help diagnose this. I have this issue on three machines, with Mint Linux 21.*
Sharing this information would be useful:
docker run
config).Same here with a SMB share. I can r+w files with the container cli but jdownloader says "invalid download directory"
/output` # cd ..
/ # ls -ld /output
drwxr-xr-x 2 root root 0 Oct 29 13:22 /output
/ # chmod a+w /output
/ # ls -ld /output
drwxr-xr-x 2 root root 0 Oct 29 13:22 /output
/ # chmod -vR 777 /output
mode of '/output' changed to 0777 (rwxrwxrwx)
mode of '/output/_extracted' changed to 0777 (rwxrwxrwx)
mode of '/output/_extracted/adsf' changed to 0777 (rwxrwxrwx)
mode of '/output/_extracted/test.txt' changed to 0777 (rwxrwxrwx)
mode of '/output/sf' changed to 0777 (rwxrwxrwx)
/ # ls -ld /output
drwxr-xr-x 2 root root 0 Oct 29 13:22 /output
/ # su-exec app touch test.456
touch: test.456: Permission denied
docker-compose.yaml
version: '3'
services:
jdownloader-2:
image: jlesage/jdownloader-2
ports:
- "1131:5800"
volumes:
- "/docker/jdownloader-2:/config:rw"
- "100_DOWNLOADS:/output"
volumes:
100_DOWNLOADS:
driver: local
driver_opts:
type: cifs
device: //192.168.1.3/100_DOWNLOADS
o: "username=jdownloader,password=xxx,vers=3.0"
The SMB Server output should not be relevant because it is already working as "root" out of the container.
What is the group and ID of the jdownloader
user you used for the volume ? Looks like this same user should be defined via USER_ID
and GROUP_ID
environment variables.
If I understand that correct, that would mean, I'm never able to mount and use other SMB accounts in linux but only my own linux account login name. 🤔
Sorry, small confusion on my side.
This line o: "username=jdownloader,password=xxx,vers=3.0"
should include the user and group ID that match USER_ID
and GROUP_ID
environment variables.
So if USER_ID=1000
and GROUP_ID=1000
, then your line should looks like:
o: "username=jdownloader,password=xxx,uid=1000,gid=1000,vers=3.0"
I have the same problem, is there already a solution or is a solution in the works?
Thank you very much
Please share:
Sorry, small confusion on my side.
This line
o: "username=jdownloader,password=xxx,vers=3.0"
should include the user and group ID that matchUSER_ID
andGROUP_ID
environment variables.So if
USER_ID=1000
andGROUP_ID=1000
, then your line should looks like:o: "username=jdownloader,password=xxx,uid=1000,gid=1000,vers=3.0"
Finally I had time to test this and it worked indeed. Thank you very much!!!
Sorry, small confusion on my side.
This line
o: "username=jdownloader,password=xxx,vers=3.0"
should include the user and group ID that matchUSER_ID
andGROUP_ID
environment variables.So if
USER_ID=1000
andGROUP_ID=1000
, then your line should looks like:o: "username=jdownloader,password=xxx,uid=1000,gid=1000,vers=3.0"
had a similar issue with SMB CIFS like https://github.com/jlesage/docker-jdownloader-2/issues/160#issuecomment-1784117210 and your proposal solved it as well as for https://github.com/jlesage/docker-jdownloader-2/issues/160#issuecomment-1825697158. Thank you very much for your support!
Ok... same part of the game, another problem.
I switched to another SMB server and now jDownloader says "skip download - Disc full". This time it seems like it's not a permission problem.
I can manualy write files with the console as root and also app user. But if I do df
the SMB volume is shown as "tempoarily unavailable"
/output # ls -ls
total 1100
1088 -rwxr-xr-x 1 app app 1105286 Feb 9 15:53 Newfg.jd2backup
0 drwxr-xr-x 2 app app 0 Jan 14 10:44 _dlc
12 -rwxr-xr-x 1 app app 1555 Feb 9 13:21 jDownloader.lnk
/output # touch test1
/output # ls
Newfg.jd2backup _dlc jDownloader.lnk test1
/output # df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 93131492 14308652 74943764 16% /
tmpfs 65536 0 65536 0% /dev
tmpfs 5099436 0 5099436 0% /sys/fs/cgroup
shm 65536 0 65536 0% /dev/shm
/dev/sda3 93131492 14308652 74943764 16% /config
df: /output: Resource temporarily unavailable
/dev/sda3 93131492 14308652 74943764 16% /etc/resolv.conf
/dev/sda3 93131492 14308652 74943764 16% /etc/hostname
/dev/sda3 93131492 14308652 74943764 16% /etc/hosts
tmpfs 5099436 0 5099436 0% /proc/acpi
tmpfs 65536 0 65536 0% /proc/keys
tmpfs 65536 0 65536 0% /proc/latency_stats
tmpfs 65536 0 65536 0% /proc/timer_list
tmpfs 5099436 0 5099436 0% /proc/scsi
tmpfs 5099436 0 5099436 0% /sys/firmware
/output # su-exec app touch test2
/output # ls
Newfg.jd2backup _dlc jDownloader.lnk test1 test2
/output # ls -ld
drwxr-xr-x 2 app app 0 Feb 9 16:41 .
/output # su-exec app ls
Newfg.jd2backup _dlc jDownloader.lnk test1 test2
/output # su-exec app df
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 93131492 14308672 74943744 16% /
tmpfs 65536 0 65536 0% /dev
tmpfs 5099436 0 5099436 0% /sys/fs/cgroup
shm 65536 0 65536 0% /dev/shm
/dev/sda3 93131492 14308672 74943744 16% /config
df: /output: Resource temporarily unavailable
/dev/sda3 93131492 14308672 74943744 16% /etc/resolv.conf
/dev/sda3 93131492 14308672 74943744 16% /etc/hostname
/dev/sda3 93131492 14308672 74943744 16% /etc/hosts
tmpfs 5099436 0 5099436 0% /proc/acpi
tmpfs 65536 0 65536 0% /proc/keys
tmpfs 65536 0 65536 0% /proc/latency_stats
tmpfs 65536 0 65536 0% /proc/timer_list
tmpfs 5099436 0 5099436 0% /proc/scsi
tmpfs 5099436 0 5099436 0% /sys/firmware
/output # ^C
/output # su-exec app ls -ld
drwxr-xr-x 2 app app 0 Feb 9 16:41 .
/output # su-exec app ls
Newfg.jd2backup _dlc jDownloader.lnk test1 test2
/output # su-exec app mkdir testdir
/output # su-exec app ls
Newfg.jd2backup _dlc jDownloader.lnk test1 test2 testdir
/output # su-exec app ls -ld
drwxr-xr-x 2 app app 0 Feb 9 16:44 .
/output # chmod a+w /output
/output # su-exec app chmod a+w /output
/output # su-exec app ls -ld
drwxr-xr-x 2 app app 0 Feb 9 16:44 .
/output # su-exec app ls
Newfg.jd2backup _dlc jDownloader.lnk test1 test2 testdir
Idk what I'm doing wrong here. Here is the docker compose... where nothing has changed besides the smb server ip and login.
version: '3'
services:
jdownloader-2:
image: jlesage/jdownloader-2
environment:
USER_ID: 1000
GROUP_ID: 1000
ports:
- "1131:5800"
volumes:
- "/docker/jdownloader-2:/config:rw"
- "jdownloader:/output"
restart: 'unless-stopped'
volumes:
jdownloader:
driver: local
driver_opts:
type: cifs
device: //192.168.1.2/jDownloader
o: "username=jdownloader,password=xxx,uid=1000,gid=1000,vers=3.0"
Current Behavior
When attempting to start downloading the program reports invalid download directory. When browsing from a CLI within the container, I can write to the folder I am attempting to save too.
Expected Behavior
jDownloader to work with an Docker mounted NFS volume.
Steps To Reproduce
No response
Environment
Container creation
version: '3' services: jdownloader-2: image: jlesage/jdownloader-2 container_name: jdownloader ports:
volumes: jdownloader-config: name: jdownloader-config driver: local driver_opts: type: nfs4 o: addr=,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14
device: ":/volume1/CONTAINERS/jdownloader/config"
jdownloader-downloads:
name: jdownloader-downloads
driver: local
driver_opts:
type: nfs4
o: addr=,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=14
device: ":/volume1/DOWNLOADS"
networks:
jdownloader:
name: jdownloader
Container log
Container inspect
Anything else?
I am using this in a Portainer Stack.