*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[SOLVED] webserver issues

Webserver service.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
klo
NewUser
NewUser
Posts: 10
Joined: 06 Nov 2014 23:12
Status: Offline

[SOLVED] webserver issues

#1

Post by klo » 08 Aug 2019 19:21

On my testing box (XigmaNAS 11.2.0.4 (6766)) the webserver service does not serve any page when running as www. What I get is a 403 error.
It works as expected when running as root. I've double checked ownership and permissions and everything is ok.

I've tried to perform some troubleshooting and
1) syslog does not report anything (no errors, no access info)
2) I've tried to setup an access log using "additional parameters" but the file does not get created (dir permissions and ownership double checked)
3) no error is logged to syslog
4) when trying to use "additional parameters" to use a specific error log file, lighttpd does not start.

On a different box (9.2.0.1 - Shigawire (revision 972)) the webserver runs as expected as www.

User avatar
ms49434
Developer
Developer
Posts: 718
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: webserver issues

#2

Post by ms49434 » 08 Aug 2019 21:58

klo wrote:
08 Aug 2019 19:21
On my testing box (XigmaNAS 11.2.0.4 (6766)) the webserver service does not serve any page when running as www. What I get is a 403 error.
It works as expected when running as root. I've double checked ownership and permissions and everything is ok.

I've tried to perform some troubleshooting and
1) syslog does not report anything (no errors, no access info)
2) I've tried to setup an access log using "additional parameters" but the file does not get created (dir permissions and ownership double checked)
3) no error is logged to syslog
4) when trying to use "additional parameters" to use a specific error log file, lighttpd does not start.

On a different box (9.2.0.1 - Shigawire (revision 972)) the webserver runs as expected as www.
a 403 can be caused by a permission issue on your www folder, i.e. missing execution rights.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

klo
NewUser
NewUser
Posts: 10
Joined: 06 Nov 2014 23:12
Status: Offline

Re: webserver issues

#3

Post by klo » 09 Aug 2019 19:48

ms49434 wrote:
08 Aug 2019 21:58
a 403 can be caused by a permission issue on your www folder, i.e. missing execution rights.
BOX 2: 9.2.0.1 - Shigawire (revision 972)

Code: Select all

drwxr-x---  3 root    wheel          512 Apr  3 12:32 www
-rw-r--r--  1 root  wheel    46 Apr  3 12:26 index.html
---> works as expected as www



BOX 1: XigmaNAS 11.2.0.4 (6766)

Code: Select all

drwxr-xr--   2 root  wheel   512 Aug  8 17:31 http
-rwxr-xr--   1 root  wheel     49 Oct 13  2012 index.html
does NOT WORK as www (403)

As you can see the permissions are stricter on the working box and have been loosened on the 11.2 box

I've also tried this:

Code: Select all

drwxr-xr-x   2 root  wheel   512 Aug  8 17:31 http
-rwxr-xr-x   1 root  wheel     49 Oct 13  2012 index.html
and this:

Code: Select all

drwxr-xr-x   2 www  www   512 Aug  8 17:31 http
-rwxr-xr-x   1 www  www     49 Oct 13  2012 index.html
without any luck

User avatar
ms49434
Developer
Developer
Posts: 718
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: webserver issues

#4

Post by ms49434 » 09 Aug 2019 22:41

What are the permissions of the www root folder?

the below example is working fine on my testbox:

Code: Select all

xigmanas: www# ll -R
total 1
drwxr-x---  2 root  www  4 Aug  8 22:36 root/
drwxr-x---  2 root  www  2 Aug  9 22:31 upload/

./root:
total 1
-rw-r-----  1 root  www  57 Aug  8 21:27 index.html
-rw-r-----  1 root  www  68 Aug  8 21:24 index.php

./upload:
total 0
xigmanas: www# 
services_websrv.png

Code: Select all

xigmanas: www# less root/index.php
<html>
<head>
</head>
<body>
<?php
echo 'Hello'
?>
</body>
</html>
xigmanas: www# 
index.png
You do not have the required permissions to view the files attached to this post.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

klo
NewUser
NewUser
Posts: 10
Joined: 06 Nov 2014 23:12
Status: Offline

Re: webserver issues

#5

Post by klo » 09 Aug 2019 22:59

After a few hours of work, now it is working as expected.
I had custom access restrictions on the Mount Point.
I had to run truss and check the system calls until I found:

Code: Select all

stat("/mnt/01/XXXXX/",0x7fffffffea18)      ERR#13 'Permission denied'
Thank you for your suggestions, ms49434

Post Reply

Return to “WebServer”