BicBucStriim icon indicating copy to clipboard operation
BicBucStriim copied to clipboard

Install BBS on Synology DSM 6.0 that run NGINX by default

Open tparvais opened this issue 7 years ago • 14 comments

Hello I install BBS on DSM6. Synology is now using NGINX by default. installcheck.php gives me correct feedback But when launching the default page, I jump to /bbs/admin/configuration/ that generates H404 errir

How to make this working with defaumlt NGINX config ?

tparvais avatar Dec 24 '16 10:12 tparvais

I haven't tried this yet with the Synology NGINX, but you could try to use the configuration for the Raspbarry Pi, see https://github.com/rvolz/BicBucStriim/wiki/WebServers#ngnix-on-raspberry-pi

rvolz avatar Dec 24 '16 11:12 rvolz

I tried, without success. I also tried to install apache 2.4 in // of Nginx, and selected Apache as www engine for BBS, but i obtain 500 internal server error.

it would be great to make BBS fully compatible with Nginx for synology

Thank you

tparvais avatar Mar 15 '17 20:03 tparvais

I'll be looking into it for v2 which is currently in the works. For now you could use Apache 2.2, which works for me and others. Synology's Apache 2.4 is currently not really useable.

rvolz avatar Mar 16 '17 08:03 rvolz

I'm also having a lot of strange problems with synology and nginx.

2018/05/26 23:29:09 [error] 729#729: *242 open() "/var/services/web/bbs/img/bbs-light-green.png" failed (13: Permission denied), client: 192.168.0.203, server: , request: "GET /bbs/img/bbs-light-green.png HTTP/1.1", host: "192.168.0.110", referrer: "https://192.168.0.110/bbs/installcheck.php" 2018/05/26 23:29:09 [error] 729#729: *244 open() "/var/services/web/missing" failed (2: No such file or directory), client: 192.168.0.203, server: , request: "GET /missing HTTP/1.1", host: "192.168.0.110", referrer: "https://192.168.0.110/bbs/img/bbs-light-green.png" 2018/05/26 23:29:09 [error] 729#729: *246 open() "/var/services/web/bbs/img/bbs-light-green.png" failed (13: Permission denied), client: 192.168.0.203, server: , request: "GET /bbs/img/bbs-light-green.png HTTP/1.1", host: "192.168.0.110", referrer: "https://192.168.0.110/bbs/installcheck.php" 2018/05/26 23:29:09 [error] 729#729: *248 open() "/var/services/web/missing" failed (2: No such file or directory), client: 192.168.0.203, server: , request: "GET /missing HTTP/1.1", host: "192.168.0.110", referrer: "https://192.168.0.110/bbs/img/bbs-light-green.png" 2018/05/26 23:29:09 [error] 729#729: *251 open() "/var/services/web/bbs/img/bbs-light-green.png" failed (13: Permission denied), client: 192.168.0.203, server: , request: "GET /bbs/img/bbs-light-green.png HTTP/1.1", host: "192.168.0.110", referrer: "https://192.168.0.110/bbs/installcheck.php"

While: root@ZenStor:~# ll /var/services/web/bbs/img/ total 64 drwxrwxr-x 2 http http 4096 Dec 21 2015 . drwxrwxr-x 11 http http 4096 Dec 21 2015 .. -rw-rw-r-- 1 http http 3395 Dec 21 2015 bbs-light-green.png -rw-rw-r-- 1 http http 3339 Dec 21 2015 bbs-light-red.png -rw-rw-r-- 1 http http 3237 Dec 21 2015 bbs-light-yellow.png -rw-rw-r-- 1 http http 42682 Dec 21 2015 writer.png

zen avatar May 26 '18 21:05 zen

I use Apache and there I have to add permission for user http für bbs folder. Maybe this is for Nguni necessary, too?

MacAndreas avatar May 26 '18 22:05 MacAndreas

As you can see all permissions are quite ok. I will be debugging this further

zen avatar May 26 '18 22:05 zen

Indeed, but there is a ‚permission denied‘ in your log, so maybe it is not filepermission but something like ACL... visit the GUI please and take a lock

MacAndreas avatar May 27 '18 06:05 MacAndreas

No PHP7 either?

robsonsobral avatar Nov 19 '18 21:11 robsonsobral

PHP7 seems to work, the critical part was the Apache

rvolz avatar Nov 19 '18 21:11 rvolz

If I choose PHP7 on Web Station, I got only a blank page.

I guess I've to open a new issue. Thank you, @rvolz .

robsonsobral avatar Nov 19 '18 22:11 robsonsobral

@robsonsobral If you just change the profile to 7.0 errors will happen, because it is empty. When I added the necessary extensions to the 7.0 profile, the app worked again.

rvolz avatar Nov 20 '18 04:11 rvolz

Which are the necessary extensions, @rvolz ?

  • php5-sqlite
  • php5-gd
  • php5-mcrypt
  • php5-intl

And? Where on docs can I find the list?

robsonsobral avatar Nov 20 '18 23:11 robsonsobral

That is a good list, and you shoud add pdo-sqlite, sqlite3 and mbstring if they are not already there or implied by the others. The list was codified in installcheck.php, because it was fairly default. Nowadays that is different, I'll try to document them.

rvolz avatar Nov 21 '18 06:11 rvolz

The problem I had (and solved) with my Synology NAS running nginx was that I created /volumes1/books as a Shared Folder in the DiskStation GUI, which (I now know) sets the unix permissions to 000. Since nginx runs as the http user, it fails to access it even when added correctly to open_basedir. Synology's DiskStation first-party services seem to use a separate user & permissions management layer unrelated to unix permissions to give access to Shared Folders, so the new directory being accessible to many Shared Folder users in the GUI is deceptive, making it seem impossible to be a permissions problem.

To fix it, I had to sudo chmod the permissions of /volume1/books to a+rx via ssh. That was the only thing standing in the way of BicBucStriim working on my Synology DiskStation.

As far as I can tell, changing these permissions hasn't broken anything for the DiskStation GUI's operation.

If installcheck.php could specifically check permissions of all directories up the path to the library and display the exact permissions of the first one that fails, that would give a clear direction for future users to fix this. As it was, the "could not read" message didn't give me a direct clue that it was a permissions problem, since the NAS was hiding that it was using a weird permissions system for a directory I could easily access already. I had to leverage old knowledge of command-line Linux beyond the install guide's scope to dig around under the hood until I narrowed it down to this specific permissions oddity.

eggdropsoap avatar Mar 30 '21 16:03 eggdropsoap