jlesage / docker-jdownloader-2

Docker container for JDownloader 2
MIT License
783 stars 71 forks source link

[Bug] jDownloader not working with NFS mounted download folder #160

Open ozdeadmeat opened 1 year ago

ozdeadmeat commented 1 year ago

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

╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           JDownloader 2                                 │
    │ Application Version:   n/a                                           │
    │ Docker Image Version:  23.06.1                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'gui'...
[supervisor  ] loading service 'certsmonitor'...
[supervisor  ] service 'certsmonitor' is disabled.
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'xvnc'...
[supervisor  ] loading service 'openbox'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] all services loaded.
[supervisor  ] starting services...
[supervisor  ] starting service 'xvnc'...
[xvnc        ] Xvnc TigerVNC 1.13.1 - built May 16 2023 17:43:49
[xvnc        ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
[xvnc        ] See https://www.tigervnc.org for information on TigerVNC.
[xvnc        ] Underlying X server release 12014000
[xvnc        ] Thu Jul 13 11:06:33 2023
[xvnc        ]  vncext:      VNC extension running!
[xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
[xvnc        ]  vncext:      Listening for VNC connections on all interface(s), port 5900
[xvnc        ]  vncext:      created VNC server for screen 0
[supervisor  ] starting service 'nginx'...
[nginx       ] Listening for HTTP connections on port 5800.
[supervisor  ] starting service 'openbox'...
[supervisor  ] starting service 'app'...
[supervisor  ] all services started.
[xvnc        ] Thu Jul 13 11:06:39 2023
[xvnc        ]  Connections: accepted: 192.168.0.78::63387
[xvnc        ]  SConnection: Client needs protocol version 3.8
[xvnc        ]  SConnection: Client requests security type None(1)
[xvnc        ]  VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888
[xvnc        ]  VNCSConnST:  Client pixel format depth 6 (8bpp) rgb222
[xvnc        ] Thu Jul 13 11:06:47 2023
[xvnc        ]  VNCSConnST:  Client pixel format depth 24 (32bpp) little-endian rgb888

Container inspect

[
    {
        "Id": "dd439435a1c1fb40a71e1ba57299c345da9b83c54c5a61f9f37af2466a87a614"                                                                                                                                                                         ,
        "Created": "2023-07-13T11:06:31.452391863Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 1003329,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-07-13T11:06:31.891814536Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:f1b3bf3b57dbbee30e3cee81973c818d3bda5606c69086dff0fbc87                                                                                                                                                                         9d16b8bad",
        "ResolvConfPath": "/var/lib/docker/containers/dd439435a1c1fb40a71e1ba572                                                                                                                                                                         99c345da9b83c54c5a61f9f37af2466a87a614/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/dd439435a1c1fb40a71e1ba57299                                                                                                                                                                         c345da9b83c54c5a61f9f37af2466a87a614/hostname",
        "HostsPath": "/var/lib/docker/containers/dd439435a1c1fb40a71e1ba57299c34                                                                                                                                                                         5da9b83c54c5a61f9f37af2466a87a614/hosts",
        "LogPath": "/var/lib/docker/containers/dd439435a1c1fb40a71e1ba57299c345d                                                                                                                                                                         a9b83c54c5a61f9f37af2466a87a614/dd439435a1c1fb40a71e1ba57299c345da9b83c54c5a61f9                                                                                                                                                                         f37af2466a87a614-json.log",
        "Name": "/jdownloader",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "935d7b6b5ec306d3970df79ef5f1287266adeaf84de6164a4fee606379cd9b3e",
            "571fd8f8bdad52b560eb22920e9bb9b41dd22667de06882521b032b96f4d66a7"
        ],
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "jdownloader",
            "PortBindings": {
                "5800/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5800"
                    }
                ],
                "5900/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "5900"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": [],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "Mounts": [
                {
                    "Type": "volume",
                    "Source": "jdownloader-config",
                    "Target": "/config",
                    "VolumeOptions": {}
                },
                {
                    "Type": "volume",
                    "Source": "jdownloader-downloads",
                    "Target": "/output",
                    "VolumeOptions": {}
                }
            ],
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/92ce02e5e49ee40953b80b570f                                                                                                                                                                         5a7f1e51436d67644de0fef5f317b1304c90e4-init/diff:/var/lib/docker/overlay2/209b2a                                                                                                                                                                         7b84ea7920779a3a21e3cae323476620954a6c1a85073876d6cf3b8b99/diff:/var/lib/docker/                                                                                                                                                                         overlay2/c2abf6231d68ae033dc9d21cb484f2443c3810449c792c0a0ca09956c0ca6c11/diff:/                                                                                                                                                                         var/lib/docker/overlay2/391acb40f2c995dada5e9f921a31469c69b86119772fc973eb776ddd                                                                                                                                                                         33afd3b2/diff:/var/lib/docker/overlay2/0d9df39fd21bb272d8c001f73fd4d9886d7d8e913                                                                                                                                                                         6a6269bf5a796da30d2f63c/diff:/var/lib/docker/overlay2/a3d3c9c5a450dcb092d653e727                                                                                                                                                                         8a24ee0cb1493b7020e698bd8205a689a24b9a/diff:/var/lib/docker/overlay2/5c6c47238c1                                                                                                                                                                         3961fca53d870ac2e8abb4aa7dc8442029e4fd65532e279b06f6f/diff:/var/lib/docker/overl                                                                                                                                                                         ay2/68055d3aecc4ee7d1410c0adce4294b13a4d5ecce2e8ef817851df2818ca1de8/diff:/var/l                                                                                                                                                                         ib/docker/overlay2/25fd998a9f0331ce6e6840a26f3edbfdc0b876b9dc0e32f42d9caf4f09949                                                                                                                                                                         5e6/diff:/var/lib/docker/overlay2/6689e63f3db7bc0ac4582dc10b3c71862f2854f8d0191b                                                                                                                                                                         dd152643dd77990e49/diff:/var/lib/docker/overlay2/627c98035851afaf61dafa45f3cfa1d                                                                                                                                                                         14bb18f54a25fdb01956bbcfc3228368d/diff:/var/lib/docker/overlay2/9f44783611a2a209                                                                                                                                                                         2eb8f7d3edb04aae04893ea846a48093d69aeaa4a51b091b/diff:/var/lib/docker/overlay2/d                                                                                                                                                                         9644ccae6b62174d8647534bd041564b50307815eecfb0dde5f177e1b8d568d/diff:/var/lib/do                                                                                                                                                                         cker/overlay2/d5646818fe232b78e5a342f10bca9399af82c7c757d0445872c549a565d02a3b/d                                                                                                                                                                         iff:/var/lib/docker/overlay2/3f99de2ba6178643e20c523021a865ad1ad010ced8fdc1ee68e                                                                                                                                                                         8365947793582/diff:/var/lib/docker/overlay2/2ce27b2a7160514a192c12ccaa9e4b70dfa4                                                                                                                                                                         102b00f270bee3e57bcc42dda0c0/diff:/var/lib/docker/overlay2/bbe21d37cc1531b5b5e55                                                                                                                                                                         1ad2a23bf86daf3ca37311a7012d74a9b58c32eec6a/diff:/var/lib/docker/overlay2/3de757                                                                                                                                                                         be4272adf2c25db5c15012b5c49684e9c3c27d55b44f69d58cf626cc57/diff:/var/lib/docker/                                                                                                                                                                         overlay2/cd37bc49b0e2d187d0f1dcb4c97f92c1fbdf51e0e701495dcfdf60b1f31542b0/diff:/                                                                                                                                                                         var/lib/docker/overlay2/ebfbffd82e9c41e6fc87a9b31ecca2adbec413a4b52758255258e977                                                                                                                                                                         3179977f/diff:/var/lib/docker/overlay2/1ec95b09f159c246a349232b36471154dac6022fd                                                                                                                                                                         5b0bf154c4f1448c52ea5aa/diff:/var/lib/docker/overlay2/90886291459c9476e29a5395e4                                                                                                                                                                         4af50141192c4dee1a317733d86b3293ea9e26/diff:/var/lib/docker/overlay2/5f6ff46d438                                                                                                                                                                         f4ca2cb90479173591f07f720e3a971600e536524c86175e14e8c/diff:/var/lib/docker/overl                                                                                                                                                                         ay2/761ff68b2a976ba26c4dc88dee51320ebb439d2bb581f81c231d97e150a90302/diff:/var/l                                                                                                                                                                         ib/docker/overlay2/2395a977d587df2a5eadfbec2ff3dfa92854eb62362404d468e35f1089b84                                                                                                                                                                         fcb/diff:/var/lib/docker/overlay2/0d571110a08383534e211f502110a22a9d25068aad5211                                                                                                                                                                         81baf4e918a8d2342d/diff:/var/lib/docker/overlay2/e4da9e0516bd80bcab619333b546e19                                                                                                                                                                         230f64a6f714fc45dfe97207f88eb0a47/diff:/var/lib/docker/overlay2/df67a71f56bbfd9f                                                                                                                                                                         71e145bb41b6c310033eb1e604960a9c4cfd0ff1edb420e1/diff:/var/lib/docker/overlay2/7                                                                                                                                                                         2a9a1e1bfba56180989ba942187fe3c91df9d7678a5ae58027f91c307dca7ec/diff:/var/lib/do                                                                                                                                                                         cker/overlay2/fbe37063cb3da0cbace0335643a5eb5af6895c950c881cf40afe4587d156f641/d                                                                                                                                                                         iff:/var/lib/docker/overlay2/8469ebfae22dc30db8d32d0c24afdf56e61e9019bc132c55987                                                                                                                                                                         122c678c1e31a/diff:/var/lib/docker/overlay2/ffcd41cab79979af5b7ff890530763f6a50b                                                                                                                                                                         1ff922b4a9edb11eb56954b5761d/diff:/var/lib/docker/overlay2/bd56b03079a336283234c                                                                                                                                                                         2f89d8ed2c1cd4c26abcc17bc364373b26f3dab1ac7/diff:/var/lib/docker/overlay2/fa2fa7                                                                                                                                                                         1eccfb46dfe4b78e765916f9126417193a4a556c2f6738857d963f6d21/diff:/var/lib/docker/                                                                                                                                                                         overlay2/da613740f64a886385f5944751d38082ac2489e4b9a0d8e76b2ebd4cf1c7b5d3/diff",
                "MergedDir": "/var/lib/docker/overlay2/92ce02e5e49ee40953b80b570                                                                                                                                                                         f5a7f1e51436d67644de0fef5f317b1304c90e4/merged",
                "UpperDir": "/var/lib/docker/overlay2/92ce02e5e49ee40953b80b570f                                                                                                                                                                         5a7f1e51436d67644de0fef5f317b1304c90e4/diff",
                "WorkDir": "/var/lib/docker/overlay2/92ce02e5e49ee40953b80b570f5                                                                                                                                                                         a7f1e51436d67644de0fef5f317b1304c90e4/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "jdownloader-config",
                "Source": "/var/lib/docker/volumes/jdownloader-config/_data",
                "Destination": "/config",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "volume",
                "Name": "jdownloader-downloads",
                "Source": "/var/lib/docker/volumes/jdownloader-downloads/_data",
                "Destination": "/output",
                "Driver": "local",
                "Mode": "z",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "dd439435a1c1",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "3129/tcp": {},
                "5800/tcp": {},
                "5900/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/b                                                                                                                                                                         in:/opt/base/sbin:/opt/base/bin",
                "ENV=/root/.docker_rc",
                "USER_ID=1000",
                "GROUP_ID=1000",
                "SUP_GROUP_IDS=",
                "UMASK=0022",
                "LANG=en_US.UTF-8",
                "TZ=Etc/UTC",
                "KEEP_APP_RUNNING=0",
                "APP_NICENESS=0",
                "INSTALL_PACKAGES=",
                "CONTAINER_DEBUG=0",
                "DISPLAY_WIDTH=1920",
                "DISPLAY_HEIGHT=1080",
                "DARK_MODE=0",
                "SECURE_CONNECTION=0",
                "SECURE_CONNECTION_VNC_METHOD=SSL",
                "SECURE_CONNECTION_CERTS_CHECK_INTERVAL=60",
                "WEB_LISTENING_PORT=5800",
                "VNC_LISTENING_PORT=5900",
                "VNC_PASSWORD=",
                "ENABLE_CJK_FONT=0"
            ],
            "Cmd": [
                "/init"
            ],
            "Image": "jlesage/jdownloader-2",
            "Volumes": {
                "/config": {},
                "/output": {}
            },
            "WorkingDir": "/tmp",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "f4a2bd1943ced4f95e9f41c28b1a6                                                                                                                                                                         853527c58b2297dcac704ca3ef998dadae8",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.depends_on": "",
                "com.docker.compose.image": "sha256:f1b3bf3b57dbbee30e3cee81973c                                                                                                                                                                         818d3bda5606c69086dff0fbc879d16b8bad",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "jdownloader",
                "com.docker.compose.project.config_files": "/data/compose/55/doc                                                                                                                                                                         ker-compose.yml",
                "com.docker.compose.project.working_dir": "/data/compose/55",
                "com.docker.compose.service": "jdownloader-2",
                "com.docker.compose.version": "2.17.2",
                "org.label-schema.description": "Docker container for JDownloade                                                                                                                                                                         r 2",
                "org.label-schema.name": "jdownloader-2",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.vcs-url": "https://github.com/jlesage/docker-j                                                                                                                                                                         downloader-2",
                "org.label-schema.version": "23.06.1"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "bb5878ae40597c1c9a4ccbe6b8988b812f613a4e97829b1a695ef1                                                                                                                                                                         414389a562",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "3129/tcp": null,
                "5800/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5800"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "5800"
                    }
                ],
                "5900/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "5900"
                    },
                    {
                        "HostIp": "::",
                        "HostPort": "5900"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/bb5878ae4059",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "jdownloader": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "jdownloader",
                        "jdownloader-2",
                        "dd439435a1c1"
                    ],
                    "NetworkID": "5d6733e2f65fa36308d947664a7dd57ab35f42eb4674b0                                                                                                                                                                         a9863549d7f6e3d261",
                    "EndpointID": "4c5348ff69e5e68cc14aaf4d4b7aa9212ef0fb832485a                                                                                                                                                                         321a1e0896168a1f77c",
                    "Gateway": "192.168.192.1",
                    "IPAddress": "192.168.192.2",
                    "IPPrefixLen": 20,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:c0:a8:c0:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

Anything else?

I am using this in a Portainer Stack.

ozdeadmeat commented 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.

ozdeadmeat commented 1 year ago

Can download to /tmp though not ideal

jlesage commented 1 year ago

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 ?

ozdeadmeat commented 1 year ago

image

when in a container shell i can write to all the directories just fine. It seems to be only related to the java application.

image

jlesage commented 1 year ago

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.

jlesage commented 1 year ago

Also, please share the export from the NFS server so we can see if it can explain the problem.

digitalextremist commented 11 months ago

I am also available to help diagnose this. I have this issue on three machines, with Mint Linux 21.*

jlesage commented 11 months ago

Sharing this information would be useful:

elec2 commented 11 months ago

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.

jlesage commented 10 months ago

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.

elec2 commented 10 months ago

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. 🤔

jlesage commented 10 months ago

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"
Darkxaser commented 10 months ago

I have the same problem, is there already a solution or is a solution in the works?

Thank you very much

jlesage commented 10 months ago

Please share:

elec2 commented 10 months ago

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"

Finally I had time to test this and it worked indeed. Thank you very much!!!

OneCreek commented 8 months ago

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"

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!

elec2 commented 7 months ago

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"