Question about WebDAV

Moderator: Lillian.W@AST

Post Reply
sandro_rocha
Posts: 76
youtube meble na wymiar Warszawa
Joined: Wed Feb 05, 2020 10:49 am

Question about WebDAV

Post by sandro_rocha »

Good Morning. I have an AS1002T with some folders shared via Samba and NFS. I enabled the WebDav service and released port 9800 on the modem and router. But when trying to connect, via browser or WebDav client, I get a 404 error. What else do I need to do to be able to access these folders via WebDav?
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Question about WebDAV

Post by orion »

You'd better to try it under LAN first, then try it through internet. What webdav client did you try? I use WinSCP.
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Question about WebDAV

Post by Nazar78 »

sandro_rocha wrote:Good Morning. I have an AS1002T with some folders shared via Samba and NFS. I enabled the WebDav service and released port 9800 on the modem and router. But when trying to connect, via browser or WebDav client, I get a 404 error. What else do I need to do to be able to access these folders via WebDav?
I tested before when I got my nas and it's working but I didn't use the built in WebDav. Had it turned off and instead using my own Nginx build with several compiled modules.

Since you asked so I tested and seems it's broken after few ADM updates. You're seeing 404 error because it's pointing to the wrong document root "/usr/builtin/html" instead of "/share", see log below. Best to open a ticket with Asustor support.

Code: Select all

2020/02/26 02:59:47 [error] 15163#0: *35 "/usr/builtin/html/Download/ " is not found (2: No such file or directory), client: 192.168.1.2, server: , request: "GET /Download/ HTTP/1.1", host: "192.168.1.6:9802"
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Question about WebDAV

Post by sandro_rocha »

I tested it with the Android app WebDAV Navigator. The application updated and started working. Now I'm looking for a video player that can play all formats via WebDAV.
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Question about WebDAV

Post by Nazar78 »

Ops my bad, it does work with certain client. I was testing with a browser/drive map which works with my nginx but not with the buildin WebDav nginx.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
TheBinary1
Posts: 12
Joined: Tue May 14, 2019 6:50 am

Re: Question about WebDAV

Post by TheBinary1 »

Nazar78 wrote:
sandro_rocha wrote:Good Morning. I have an AS1002T with some folders shared via Samba and NFS. I enabled the WebDav service and released port 9800 on the modem and router. But when trying to connect, via browser or WebDav client, I get a 404 error. What else do I need to do to be able to access these folders via WebDav?
I tested before when I got my nas and it's working but I didn't use the built in WebDav. Had it turned off and instead using my own Nginx build with several compiled modules.

Since you asked so I tested and seems it's broken after few ADM updates. You're seeing 404 error because it's pointing to the wrong document root "/usr/builtin/html" instead of "/share", see log below. Best to open a ticket with Asustor support.

Code: Select all

2020/02/26 02:59:47 [error] 15163#0: *35 "/usr/builtin/html/Download/ " is not found (2: No such file or directory), client: 192.168.1.2, server: , request: "GET /Download/ HTTP/1.1", host: "192.168.1.6:9802"
To be more specific, this is indeed a bug in ADM. If you do not want to wait for Asustor to release a fix, you can fix this issue yourself by:
1. SSH into your Asustor as admin user
2. Sudo to root
3. Stop ADM's nginx with the command:

Code: Select all

/usr/builtin/etc/init.d/S53nginx stop
4. Fix the ADM bug by editing /usr/builtin/etc.default/nginx/nginx.conf and adding a root tag in the pre-existing http block as-per http://nginx.org/en/docs/http/ngx_http_ ... .html#root .... for example:

Code: Select all

http {
    include       mime.types;
    default_type  application/octet-stream;

    charset       utf-8;

    sendfile      on;
    tcp_nopush    on;

    keepalive_timeout  65;

    server_tokens off;

    ssl_certificate      /usr/builtin/etc/nginx/ssl.crt;
    ssl_certificate_key  /usr/builtin/etc/nginx/ssl.key;

    # virtual host server
    include  sites-enabled/*.conf;
    root /share;
}
The

Code: Select all

root /share;
is what will fix the problem.

5. Start ADM's nginx with the command:

Code: Select all

/usr/builtin/etc/init.d/S53nginx start
brujo
Posts: 38
Joined: Tue Nov 15, 2022 9:42 pm

Re: Question about WebDAV

Post by brujo »

Hi Nazar78
I have a similar issue, is this bug fixed?
I have included ports 9800 and 9802 in the port forwarding asus router.
When I try to connect, I get the "404 page not found" nginx.
I am new to this environment, I have a qnap and a Netgear NAS, they are are the end of life. The AS6704 will replace both. I want to make sure what works and what does not.
So far I only had 2 issues, Filezilla and WebDav.
Thank You for your help
Mario
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Question about WebDAV

Post by Nazar78 »

It's not a bug at all, it will not work in regular browsers because it's not the normal browser HTTP requests like GET/POST/CONNECT. Normal browsers don't understand these. WebDAV uses another type of HTTP requests such as PROPFIND/PUT/DELETE/LOCK etc. and only a proper WebDAV client would work correctly. Example try below and it works:

Code: Select all

curl -vXPROPFIND http://NAS-user:NAS-Password@NAS-HOST-OR-IP:9800
Try with a proper WebDAV client like Windows share mapping (limited to 4GB each file, requires Digest-Auth/HTTPS/non-self-signed-cert) or WinSCP (works with non-auth/non-HTTPS).
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
brujo
Posts: 38
Joined: Tue Nov 15, 2022 9:42 pm

Re: Question about WebDAV

Post by brujo »

Thank You for your response
Mario
Post Reply

Return to “[Official] For AS10XX Series”