I have setup a webdav dir in nginx like this:

server { 
    root /home/webuser/www/

    # some more locations for static content

    location /password-repo/ {
        root      /home/webuser/www/dav;
        client_body_temp_path /var/dav/temp;
        dav_methods     PUT DELETE MKCOL COPY MOVE;
        dav_ext_methods   PROPFIND OPTIONS;
        dav_access    user:rw group:rw all:rw;
        autoindex     on;
        auth_basic "restricted";
        auth_basic_user_file /etc/nginx/htpasswd;

I manage to connect to it with WinSCP with WebDav protocol, TLS on, port 443, my host, and in advanced settings, I put /password-repo as remote directory.

But I noticed multiple weird stuff:

  • the path in WinSCP tab is like user@host/password-repo/Password-repo
  • The date of the parent folder is 30/12/1899
  • I put an empty file from the server by using "touch test" in the folder specified in root and can't see it in WinSCP
  • when I try to upload a file, I first got a confirmation popup from WinSCP to overwrite the file I'm uploading (which does not exists) and if I accept, I got back a 500 error

What's going on?


I had to do 2 things to make it works:

  • chown dav to nginx user
  • create "password-repo" directory under /home/webuser/dav/

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.