Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Synology and COPS #510

Open
entuccio opened this issue Jan 8, 2022 · 17 comments
Open

Problem with Synology and COPS #510

entuccio opened this issue Jan 8, 2022 · 17 comments

Comments

@entuccio
Copy link

entuccio commented Jan 8, 2022

Hello,
I've installed COPS inside my Synology Web server.
My Library is outside www default folder.

I set:

...
$config['calibre_directory'] = '/volume1/Documenti/LibreriaPersonale/';
...

checkconfig.php said:

"Not all Calibre tables were found. Are you sure you're using the correct database."

I granted permission 777 to the library with ssh and "open_base" on PHP info is not set.

What can I do ?

Thanks

@SylvainDx
Copy link

SylvainDx commented Jan 8, 2022 via email

@SylvainDx
Copy link

SylvainDx commented Jan 8, 2022 via email

@entuccio
Copy link
Author

entuccio commented Jan 8, 2022

Works perfectly. Thank you :-)

@khiryos
Copy link

khiryos commented Jan 12, 2022

Hello,
I followed the whole installation process but still can't figure out why COPS does not work ("https://DDNS/cops" displayed nothing)

  1. I have a web service portal running Apache 2.4 and PHP 7.6 (with all extensions checked)
  2. My personal Calibre library is located at ":/volume1/books", and this path is written in the "config_local.php" file and in the PHP profile of Web Station
  3. Read/Write permissions for http group are checked for the "books" folder
  4. My firewall is disactivated (just for testing)

Do you have an idea of what I am doing wrong, please?

@marioscube
Copy link

Just for testing purposes:

Put your calibre library in a subdirectory of COPS (./COPS/books) and point to there in config_local.php.

Does this work?

@khiryos
Copy link

khiryos commented Jan 13, 2022

Hello Mario,

Thanks for helping. I tested what you suggest (and also switched to a full-stack IPv4 in order to use COPS on the internet, but it was another problem). Now I have a blank page with "No input file specified."

@khiryos
Copy link

khiryos commented Jan 13, 2022

I found an old thread (here: #267 )

I just replaced my PHP basedir by the following line and it works now: /tmp:/var/services/tmp:/var/services/web:/var/services/homes:/volume1/books/

I still don't know why we have to put the temp folders and web one but anyway, it works.

EDIT: I tested different combinations, and it seems like only the web folder is needed for removing the error I encountered (now it looks like: /var/services/web:/volume1/books/)

@marioscube
Copy link

So COPS works, Synology works, great!

Just put a password on COPS for external access.

I cannot test it, but COPS should work with IPv6.
Is there a reason why it should not?

@khiryos
Copy link

khiryos commented Jan 14, 2022

You are right, Mario. Now I have a user/password authentication (with a htpasswd file) but it is also enabled for local access (it's not a big deal for me). Maybe I should use another port than the default 443 to be more secure.

I don't know if COPS also works with IPv6.

@marioscube
Copy link

@khiryos

1 - password
Check out this info (haven't tried it myself yet but...) https://stackoverflow.com/questions/4913000/use-htaccess-to-restrict-external-access-to-my-intranet

2 - port 443
Security through obscurity might just work for a home-server.
I use a port number > 10.000 and forward this to 80 or 443 in my router. If I decide to change the port I only have to change the rules in my router and not all kinds of configuration files (I run multiple "servers" on several Pi's for testing-fun).

3 - IPv6
Don't know. I have a tunnel IPv4 to IPv6 but have not tested much with it.

@khiryos
Copy link

khiryos commented Jan 14, 2022

1 - Your link sends me to "No results matched your search."
2 - It's a good advice. I already did that for my default http/https ports (instead of 5000/5001 that Synology put) but I wonder how to change the port for COPS. It's not a straightforward way (click, enter, port, save). How to achieve the port change, please?
3 - Okay.

Thanks for your feedback.

@marioscube
Copy link

marioscube commented Jan 14, 2022

This should work (I hope):

https://stackoverflow.com/questions/4913000/use-htaccess-to-restrict-external-access-to-my-intranet

The port setup should be done inside your (own or ISP provided) modem/router settings page.

@khiryos
Copy link

khiryos commented Jan 15, 2022

Hello Mario,
Yes, I know how to redirect ports in my router, but I wonder how to change the access port of the COPS application itself. When I enter https://DDNS:XXXX/cops, with XXXX redirected to 443 from my router settings, it does not work anymore.
Thanks for your link. I think the answer is here: https://tomschlick.com/conditional-htpasswd-multi-environments/ but I admit that don't have the strength to dive into lines of code.

@marioscube
Copy link

COPS has no settings for setting an access port.

If https://DDNS:443/cops worked before (https:///DDNS/cops) then https://DDNS:12345/cops should work if you forwarded port 12345 to 443 for the internal IP if COPS in your router.

@khiryos
Copy link

khiryos commented Jan 15, 2022

Now it works. You know why? Because I just had to put an "/" at the of the URL ^^

@marioscube
Copy link

Sometimes an “/“ is all it needs.........

It seems to me its browser dependent. Some browser add an “/“ automatically and some don’t. I sometimes have “//“ at the end of the url, and then it sometimes works, and sometimes not. Pretty frustrating. ;-)

@khiryos
Copy link

khiryos commented Jan 15, 2022

Aha you're right! Thanks again for your help ;) Have a nice weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants