Coder Social home page Coder Social logo

Comments (7)

dgraziotin avatar dgraziotin commented on August 19, 2024

Hi, and thanks for reporting your issue! First things first, which image version are you using, which options and/or nginx.conf?

I use PUID and GID as well in the example docker-compose.yml.

These are the permissions I see:

docker conatiner exec nginxwebdav ls -la /var/cache/nginx
total 36
drwxr-xr-x 1 root root 4096 Jan 30 18:35 .
drwxr-xr-x 1 root root 4096 Jan 30 18:35 ..
drwx------ 1 abc  1000 4096 Jan 30 18:35 client_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 fastcgi_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 proxy_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 scgi_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 uwsgi_temp

So, correct that these files have 700 for permissions with PUID as their owner. So, they are not supposed to give issues (but we can look into it). The directory is owned by root but has 751 as permission.

The directory would miss w permissions if used, I agree. I cannot reproduce your issue, however. I allowed 10G for body size (CLIENT_MAX_BODY_SIZE=10G), created a 10GB test file, and uploaded it with Cyberduck. While the file was uploading (I checked 5 times), there were no changes to /var/cache/nginx:

docker container exec nginxwebdav ls -la /var/cache/nginx
total 36
drwxr-xr-x 1 root root 4096 Jan 30 18:35 .
drwxr-xr-x 1 root root 4096 Jan 30 18:35 ..
drwx------ 1 abc  1000 4096 Jan 30 18:35 client_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 fastcgi_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 proxy_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 scgi_temp
drwx------ 1 abc  1000 4096 Jan 30 18:35 uwsgi_temp

The file uploaded successfully.

Could you tell me a bit more on how to reproduce this issue, including what you see and what brought you to think you needed to change permissions to /var/cache/nginx? That might help. Thanks!

from docker-nginx-webdav-nononsense.

Oliph avatar Oliph commented on August 19, 2024
  1. I used the github version (pulled yesterday) and build it.
  2. My docker compose is nothing fancy, PUID=1000 (my user) and PGID=100 (users group) to access the external data folder mounted in the data. CIENT_MAX_BODY_SIZE=120M
  3. I didn't modify the nginx.conf file

I reproduced the issue (with the 700 permission) and here is an example of the error I receive.

nginx-webdav-zotero | 2022/01/30 19:28:38 [crit] 324#324: *110 unlink() "/var/cache/nginx/client_temp/0000000205" failed (13: Permission denied), client: 172.20.0.1, server: localhost, request: "PUT /zotero/zotero-test-file.prop HTTP/1.1", host: "zotero.my.domain.com"
nginx-webdav-zotero | 172.20.0.1 - zotero [30/Jan/2022:19:28:38 +0100] "PUT /zotero/zotero-test-file.prop HTTP/1.1" 500 177 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0"
nginx-webdav-zotero | 2022/01/30 19:28:38 [crit] 324#324: *110 unlink() "/var/cache/nginx/client_temp/0000000205" failed (13: Permission denied) while closing request, client: 172.20.0.1, server: 0.0.0.0:80
nginx-webdav-zotero | 2022/01/30 19:28:38 [crit] 324#324: *111 unlink() "/var/cache/nginx/client_temp/0000000207" failed (13: Permission denied), client: 172.20.0.1, server: localhost, request: "PUT /zotero/zotero-test-file.prop HTTP/1.1", host: "zotero.my.domain.com"
`
Not sure if it is the info you require

from docker-nginx-webdav-nononsense.

dgraziotin avatar dgraziotin commented on August 19, 2024

Seems to be working here..

This is up to linking Zotero to WebDAV:

docker compose up
[+] Running 1/0
 ⠿ Container nginxwebdav  Created                                          0.0s
Attaching to nginxwebdav
nginxwebdav  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
nginxwebdav  | [s6-init] ensuring user provided files have correct perms...exited 0.
nginxwebdav  | [fix-attrs.d] applying ownership & permissions fixes...
nginxwebdav  | [fix-attrs.d] done.
nginxwebdav  | [cont-init.d] executing container initialization scripts...
nginxwebdav  | [cont-init.d] 01-envfile: executing...
nginxwebdav  | [cont-init.d] 01-envfile: exited 0.
nginxwebdav  | [cont-init.d] 01-migrations: executing...
nginxwebdav  | [migrations] started
nginxwebdav  | [migrations] no migrations found
nginxwebdav  | [cont-init.d] 01-migrations: exited 0.
nginxwebdav  | [cont-init.d] 02-tamper-check: executing...
nginxwebdav  | [cont-init.d] 02-tamper-check: exited 0.
nginxwebdav  | [cont-init.d] 10-adduser: executing...
nginxwebdav  | usermod: no changes
nginxwebdav  |
nginxwebdav  | -------------------------------------
nginxwebdav  |           _         ()
nginxwebdav  |          | |  ___   _    __
nginxwebdav  |          | | / __| | |  /  \
nginxwebdav  |          | | \__ \ | | | () |
nginxwebdav  |          |_| |___/ |_|  \__/
nginxwebdav  |
nginxwebdav  |
nginxwebdav  | Brought to you by linuxserver.io
nginxwebdav  | -------------------------------------
nginxwebdav  |
nginxwebdav  | To support LSIO projects visit:
nginxwebdav  | https://www.linuxserver.io/donate/
nginxwebdav  | -------------------------------------
nginxwebdav  | GID/UID
nginxwebdav  | -------------------------------------
nginxwebdav  |
nginxwebdav  | User uid:    501
nginxwebdav  | User gid:    20
nginxwebdav  | -------------------------------------
nginxwebdav  |
nginxwebdav  | [cont-init.d] 10-adduser: exited 0.
nginxwebdav  | [cont-init.d] 30-config: executing...
nginxwebdav  | [cont-init.d] 30-config: exited 0.
nginxwebdav  | [cont-init.d] 90-custom-folders: executing...
nginxwebdav  | [cont-init.d] 90-custom-folders: exited 0.
nginxwebdav  | [cont-init.d] 99-custom-scripts: executing...
nginxwebdav  | [custom-init] no custom files found exiting...
nginxwebdav  | [cont-init.d] 99-custom-scripts: exited 0.
nginxwebdav  | [cont-init.d] done.
nginxwebdav  | [services.d] starting services
nginxwebdav  | [services.d] done.
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:19 +0100] "OPTIONS /zotero/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:19 +0100] "PROPFIND /zotero/ HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:19 +0100] "PROPFIND / HTTP/1.1" 207 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "MKCOL /zotero/ HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "OPTIONS /zotero/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "PROPFIND /zotero/ HTTP/1.1" 207 224 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 2022/01/31 14:08:22 [error] 324#324: *1 open() "/data/zotero/nonexistent.prop" failed (2: No such file or directory), client: 172.18.0.1, server: localhost, request: "GET /zotero/nonexistent.prop HTTP/1.1", host: "127.0.0.1:32080"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "GET /zotero/nonexistent.prop HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "PUT /zotero/zotero-test-file.prop HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "GET /zotero/zotero-test-file.prop HTTP/1.1" 200 1 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:22 +0100] "DELETE /zotero/zotero-test-file.prop HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "OPTIONS /zotero/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "PROPFIND /zotero/ HTTP/1.1" 207 224 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 2022/01/31 14:08:26 [error] 324#324: *1 open() "/data/zotero/nonexistent.prop" failed (2: No such file or directory), client: 172.18.0.1, server: localhost, request: "GET /zotero/nonexistent.prop HTTP/1.1", host: "127.0.0.1:32080"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "GET /zotero/nonexistent.prop HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "PUT /zotero/zotero-test-file.prop HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "GET /zotero/zotero-test-file.prop HTTP/1.1" 200 1 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:08:26 +0100] "DELETE /zotero/zotero-test-file.prop HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"

After adding one of my open access papers by DOI (10.7717/peerj.289) and forcing a sync

nginxwebdav  | 2022/01/31 14:16:01 [error] 324#324: *4 open() "/data/zotero/BFHTWTLC.prop" failed (2: No such file or directory), client: 172.18.0.1, server: localhost, request: "GET /zotero/BFHTWTLC.prop HTTP/1.1", host: "127.0.0.1:32080"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:16:01 +0100] "GET /zotero/BFHTWTLC.prop HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:16:01 +0100] "PUT /zotero/BFHTWTLC.zip HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:16:01 +0100] "PUT /zotero/BFHTWTLC.prop HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"

Two files BFHTWTLC.{prop, zip} are created in the WebDAV folder.

If I add another PDF manually to the newly created record and force sync:

nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "OPTIONS /zotero/ HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "PROPFIND /zotero/ HTTP/1.1" 207 224 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 2022/01/31 14:18:24 [error] 324#324: *8 open() "/data/zotero/nonexistent.prop" failed (2: No such file or directory), client: 172.18.0.1, server: localhost, request: "GET /zotero/nonexistent.prop HTTP/1.1", host: "127.0.0.1:32080"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "GET /zotero/nonexistent.prop HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "PUT /zotero/zotero-test-file.prop HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "GET /zotero/zotero-test-file.prop HTTP/1.1" 200 1 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:18:24 +0100] "DELETE /zotero/zotero-test-file.prop HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"

If I put both PDF in the trash, empty the trash, and force sync:

nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:19:59 +0100] "DELETE /zotero/BFHTWTLC.zip HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"
nginxwebdav  | 172.18.0.1 - user [31/Jan/2022:14:19:59 +0100] "DELETE /zotero/BFHTWTLC.prop HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:60.0) Gecko/20100101 Firefox/60.0"

Unless I am missing some use case, the issue is on your side. I can still try to help you. Let's verify the obvious one: a typo in your options.

You wrote:

PUID=1000 (my user) and PGID=100

PGID=100 is unusual. Are you certain that it's not 1000 instead? This would be the easiest explanation.

from docker-nginx-webdav-nononsense.

dgraziotin avatar dgraziotin commented on August 19, 2024

@Oliph, any news on this?

from docker-nginx-webdav-nononsense.

Oliph avatar Oliph commented on August 19, 2024

Sorry, got busy.
I didn't do a typo on my container, this is my user pgid.
However, your logs don't show anything put in /var/cache, is it possible that it could be the reason. I am happy to do some tests for you to figure it out.
PS: if not having time, no worries, it works for me with the changes in the chmod.

from docker-nginx-webdav-nononsense.

dgraziotin avatar dgraziotin commented on August 19, 2024

@Oliph it would really help if you could find a way for me to replicate the issue. I have just forced UID 1000 and GID 100 on a fresh container on my Raspberry Pi, and it is working fine..

from docker-nginx-webdav-nononsense.

dgraziotin avatar dgraziotin commented on August 19, 2024

Closing it for now as I can't replicate, but feel free to reopen in case.

from docker-nginx-webdav-nononsense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.