Open rkhirata opened 3 months ago
Does it work if you run this command: sudo systemctl reload nginx
Unfortunately, no.
Tried before and after a reboot.
I can't replicate the problem. Everything I fixed today would've been fixed by a reboot.
What is the error number? When setting permssions? Are you Permissions or ACLs? Permissions won't change the permissions of the existing files and I'm not sure if ACLs work with webdav. What filesystem are the files on? Does it work when you turn auth off?
There is no error number, just the error message.
Regarding the permissions, they were configured to allow Read/Write for all users and groups using the "Shared Folders" OMV7 section. Also, I used chmod 777 CLI command to also allow full access of the designated folder.
Regarding the file system, it is the Raspberry Pi default.
Turning auth off doesnt change anything. Unfortunately the same error
What is the output of:
zgrep webdav /var/log/nginx/*.log.*
The most relevant one should be this?
/var/log/nginx/openmediavault-webgui_access.log.4.gz:192.168.2.7 - rkhirata [21/Jul/2024:13:50:59 -0300] "GET /test.txt HTTP/1.1" 302 138 "http://192.168.2.6/webdav" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
The whole results file is attached.
Yep but I don't know why. What is the output:
sudo omv-salt deploy run webdav
sudo cat /etc/nginx/openmediavault-webgui.d/openmediavault-webdav.conf
sudo omv-salt deploy run webdav:
ID: configure_webdav
Function: file.managed
Name: /etc/nginx/openmediavault-webgui.d/openmediavault-we bdav.conf
Result: True
Comment: File /etc/nginx/openmediavault-webgui.d/openmediavau lt-webdav.conf is in the correct state
Started: 11:29:21.795329
Duration: 1134.512 ms
Changes:
ID: configure_lockzone_conf
Function: file.managed
Name: /etc/nginx/conf.d/openmediavault-lockzone.conf
Result: True
Comment: File /etc/nginx/conf.d/openmediavault-lockzone.conf is in the correct state
Started: 11:29:22.931367
Duration: 815.841 ms
Changes:
ID: remove_webdav_auth_files
Function: file.absent
Name: /etc/pam.d/openmediavault-webdav
Result: True
Comment: File /etc/pam.d/openmediavault-webdav is not present
Started: 11:29:23.748371
Duration: 5.791 ms
Changes:
ID: remove_webdav_auth_files
Function: file.absent
Name: /etc/openmediavault-webdev.group.allow
Result: True
Comment: File /etc/openmediavault-webdev.group.allow is not p resent
Started: 11:29:23.755221
Duration: 5.47 ms
Changes:
ID: reload_nginx_service
Function: service.running
Name: nginx
Result: True
Comment: The service nginx is already running
Started: 11:29:41.046587
Duration: 458.444 ms
Changes:
Total states run: 5 Total run time: 2.420 s
sudo cat /etc/nginx/openmediavault-webgui.d/openmediavault-webdav.conf:
location /webdav { alias /WebDAV/; dav_methods PUT DELETE MKCOL COPY MOVE; dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK; dav_ext_lock zone=foo; dav_access user:rw group:rw; create_full_put_path on; client_body_temp_path /srv/client_temp; autoindex on; error_page 404 /_404; if ($request_method = MKCOL) { rewrite ^(.[^/])$ $1/; } set $destination $http_destination; set $parse ""; if ($request_method = MOVE) { set $parse "${parse}M"; } if ($request_method = COPY) { set $parse "${parse}M"; } if (-d $request_filename) { rewrite ^(.[^/])$ $1/; set $parse "${parse}D"; } if ($destination ~ ^(https?://.+)$) { set $ob $1; set $parse "${parse}R${ob}"; } if ($parse ~ ^MDR(.*[^/])$) { set $mvpath $1; set $destination "${mvpath}/"; more_set_input_headers "Destination: $destination"; }
}
What is the output of: stat /WebDAV/
File: /WebDAV/ Size: 4096 Blocks: 16 IO Block: 4096 directory Device: 179,2 Inode: 2219521 Links: 3 Access: (2777/drwxrwsrwx) Uid: ( 0/ root) Gid: ( 100/ users) Access: 2024-07-20 19:19:10.570497363 -0300 Modify: 2024-07-21 13:32:35.734944263 -0300 Change: 2024-07-21 20:51:26.689920290 -0300 Birth: 2024-07-20 19:19:10.570497363 -0300
To try to replicate your system, I created a sharedfolder named Webdav in the root of the OS filesystem with a path of /Webdav. I made sure it had 2777 permissions. I put files in it that were 644. I was able to view the files and download them whether auth was enabled or not. I'm not sure what is wrong but I don't think it is something the plugin can fix.
I was going to inform about the same exact error in OMV 7. I have gone through the steps described here and I have similar output as @rkhirata . Any help is welcome.
Until I can replicate it and get logs pointing me toward a problem, I don't know what to do to fix these systems.
I have the same problem. I want to use webdav without having to install Nextcloud or anything like that. I want to use only OMV. However, I am not able to do so either. I am not an advanced Linux user, which makes things a little more difficult for me. Any solution to fix the problem?
OMV7, WebDAV plugin up and running, folder to be shared indeed listed in the Shared Folders menu, all permissions given.
When accessing the "ip.address.of.webdav/webdav" with a browser (tried Chrome, Edge and Arc), I can see the contents list of the designated folder. However, after clicking anything (foldes or files), I get an red error message: "Software Failure. Press left mouse button to continue. The requested page was not found".
After clicking with the instructed left mouse button, I get to the OMV7 login page.
Any help?
Hi! I had the same problem. I noticed that when I checked the link of a file it was: ip.address.of.webdav/filename not ip.address.of.webdav/webdav/filename. So the /webdav is missing from the link, but I can' fix it. I read on another forum that we have to edit the /etc/nginx/openmediavault-webgui.d/openmediavault-webdav.conf and change the the keyword "alias" to "root". But after restarting nginx I get error 404 Not Found.
Not all webdav clients force you to use the /webdav path. So, the plugin is flexible. Switching to root is not correct. See the forum thread - https://forum.openmediavault.org/index.php?thread/46010-webdav/&postID=400632#post400632
Should use trailing slash in url: http://omv.local/webdav/
instead of http://omv.local/webdav
, otherwise it misses webdav
part in path of another file/folder.
rewrite rule may help:
rewrite ^([^.]*[^/])$ $1/ permanent;
OMV7, WebDAV plugin up and running, folder to be shared indeed listed in the Shared Folders menu, all permissions given.
When accessing the "ip.address.of.webdav/webdav" with a browser (tried Chrome, Edge and Arc), I can see the contents list of the designated folder. However, after clicking anything (foldes or files), I get an red error message: "Software Failure. Press left mouse button to continue. The requested page was not found".
After clicking with the instructed left mouse button, I get to the OMV7 login page.
Any help?