Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Related Tools

Notices

Reply
 
Thread Tools Search this Thread
Old 03-13-2017, 07:09 PM   #1486
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
Quote:
In fact I forgot that I have a redirection for 80 and 443 because of the use of photostation....
Yeah, that explains why cops "just" works from outside of your LAN.

i do not use Photostation myself so I cannot help you there, but a quick search on google seems to imply that changing the port for Photostation so that is different fromt the port for cops is not easily doable. (Yes it can be done for cops, but then you need some knowledge of Apache. And Apache for Synology is not "regular" Apache. Most files that need changing are in different places and/or have different names. I never bothered to try. And that's even without the differences between DSM 5 and 6.)

Quote:
one stuff that I don't control also is the automatic use of the port + adress modification
That probably has something to do with client side browser caches. Try with firefox in privacy mode. for me that helps. (Or use different browsers for different purposes, for instance Firefox and Opera or Seamonkey or Waterfox etc.)
mariosipad is offline   Reply With Quote
Old 03-14-2017, 06:39 AM   #1487
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
thanks. I succeed to add authentification to cops so it is no more a problem to have photostation and cops using same port. I also read stuff about this and I confirm it seems to be quite complex.

Using chrome privacy mode, there is no "port redirection", it seems that browser memorize the port used on the last adresse (and also if https was used or not).

But I detect something strange as I'm not familiar with linux access mode. the directory of calibre database has access for http group and it works good. but after a copy/paste from windows to replace file in this directory by up-to-date calibre database, access to .db file is lost (checkconfig error). I need to add manually http group access to the .db file so that it works again.

Any idea ? each time a new database is copy paste from windows, I will need to reconfigure access of the database ? is there a clever solution ?
iostrym is offline   Reply With Quote
Advert
Old 03-14-2017, 01:21 PM   #1488
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
How do you copy files from Windows to Synology?
- with the file explorer from windows? (after "mounting" a shared Sybology folder in Windows)
- with the file browser inside the Synology Gui?

For COPS user:group rights on the database is not really important.
It's important that all files can be read.

So no need to add http group access but there is a need to make sure that all files are readable (r) for all users.

And no, I do not have a smart solution. ;-)
mariosipad is offline   Reply With Quote
Old 03-14-2017, 03:47 PM   #1489
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
I copy from a file explorer from Windows through shared folder. I use a software to make automatic backup.

I will double check this evening but I had to add right for http group on .DB file after the backup on the Nas. => [EDIT] = after a backup .db file has no more right for http group then it no more works. What is the rule for access in linux ? does providing access to a directory gives access to file inside it ? how to be sure that, after a copy paste, new file inside a directory will have the same right than the directory itself ?

Last edited by iostrym; 03-14-2017 at 04:39 PM.
iostrym is offline   Reply With Quote
Old 03-14-2017, 04:09 PM   #1490
superturrican
Member
superturrican began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2016
Device: Kobo Touch
I updated my COPS install to the latest one and now I get a 404 on all file downloads. pages display okay, and the built-in epub viewer displays the books correctly, but the download links all give the same 404 error and the error log says "No such file or directory"

edit: my web server is NGINX, the machine is a Raspberry Pi 3, the OS is Debian (raspbian) wheezy.

Last edited by superturrican; 03-14-2017 at 04:11 PM.
superturrican is offline   Reply With Quote
Advert
Old 03-14-2017, 04:45 PM   #1491
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@superturrican

From what source did you install cops and what version is it excactly? (1.0.1 /1.0.2)


Edit: Raspbian wheezy on a Pi 3? (Does that evevn work?)

Last edited by mariosipad; 03-14-2017 at 04:47 PM.
mariosipad is offline   Reply With Quote
Old 03-14-2017, 06:46 PM   #1492
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Quote:
Originally Posted by MontyJ View Post

So when I made changes/additions to Calibre, I run my backup program to add those changes to the backup on the NAS so the Calibre libraries are duplicated exactly. COPS then automatically picks up any changes it sees on the NAS; no further adjusting or maintenance required for COPS.
@Monty, do you run a periodical script on your NAS to apply chmod to the backup database so that http group can have access to your freshly copied database ?

because with my Synology and Syncback tool from windows, after backup I don't have anymore the http group rights on the file inside the shared folder "ebook" (cops no more works after that until I re-set rights on the files)
iostrym is offline   Reply With Quote
Old 03-15-2017, 09:27 PM   #1493
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by iostrym View Post
@Monty, do you run a periodical script on your NAS to apply chmod to the backup database so that http group can have access to your freshly copied database ?

because with my Synology and Syncback tool from windows, after backup I don't have anymore the http group rights on the file inside the shared folder "ebook" (cops no more works after that until I re-set rights on the files)
I use a rsync script in Linux and throw in the --super argument. This works just fine with no attribute changes need for COPS on the NAS or users accessing the files. My backup script looks like this:
Code:
sshpass -p "naspasswd" rsync -h --progress --stats -r -tgo -p -l -D -H --super --update --delete-after --delete-excluded --exclude=**/*tmp*/ --exclude=**/*cache*/ --exclude=**/*Cache*/ --exclude=**~ --exclude=/mnt/*/** --exclude=/media/*/** --exclude=**/lost+found*/ --exclude=/var/run/** --exclude=/run/** --exclude=/proc/** --exclude=/dev/** --exclude=/sys/** --exclude=**/*Trash*/ --exclude=**/*trash*/ --exclude=**/.gvfs/ --protect-args --log-file=/home/myusername/calibre_ssh.log /mnt/Data/Calibre_Libraries/ admin@192.168.x.xxx:/share/Backups/Calibre_eBooks/
Many of those excludes are really not needed as they do not exist in the Calibre libraries, but I use this same format for other backup jobs of my local Linux system, so leave them there for continuity.
MontyJ is offline   Reply With Quote
Old 03-17-2017, 04:38 PM   #1494
zab0
Junior Member
zab0 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2017
Device: kobo aura
@superturrican
@mariosipad
Quote:
Originally Posted by superturrican View Post
I updated my COPS install to the latest one and now I get a 404 on all file downloads. pages display okay, and the built-in epub viewer displays the books correctly, but the download links all give the same 404 error and the error log says "No such file or directory"
[...]
Same thing here, only I installed v1.0.1 from scratch. Machine is PiB+/Raspbian (kinda)/Apache2, accessed from Firefox on windows/Chrome on Android/Kobo Aura browser.
Oh, and I'm new here, so hi everybody
[couple of hours later]
after searching this thread and googling around, I've found that my /etc/apache2/apache2.conf (may be httpd.conf elsewhere) prevented the loading of .htaccess files, including the one provided by COPS installation (/var/www/ebooks/.htaccess).
Editing the AllowOverride directive to "All" in the following section:
Code:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
fixed the problem.
However, I would like to include the .htaccess instructions in the apache2.conf file, instead of pointing to the .htaccess itself (which would be accessed every time a file is requested). Does anybody know how to do that?
Appending the whole .htaccess content inside apache2.conf, wrapped in
Code:
<Directory /path/>
[...]
</Directory>
Didn't work.
zab0 is offline   Reply With Quote
Old 03-17-2017, 07:18 PM   #1495
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@zab0

Yes, to be able to download epubs (etc) from cops to a Kobo device you need to
- put $config['cops_use_url_rewriting'] = '1'; in config_local.php
- enable .htaccess (to enable rewriting) by Editing the AllowOverride directive to "All" (for the directory cops is in)

What else from the .htaccess file do you want to put in a apache config file?
I've only partially tried it, but it should be possible.

Even on slow systems (Raspberry Pi 1) I did not notice a slowdown when using a .htaccess file with cops. (few users and few concurrent processes).
On a fast system ............


@superturrican
As you are using NGINX (and not Apache) I do not know if this will help you.
At least it should give a direction to search in.
mariosipad is offline   Reply With Quote
Old 03-17-2017, 08:11 PM   #1496
iostrym
Connoisseur
iostrym began at the beginning.
 
Posts: 73
Karma: 10
Join Date: Mar 2015
Device: kobo
Quote:
Originally Posted by MontyJ View Post
I use a rsync script in Linux and throw in the --super argument.
Thanks. you copy paste of the calibre database is done from the NAS right ?

mine is done from windows to the nas, I guess this is why access rights are messy when the synchronization is done...
iostrym is offline   Reply With Quote
Old 03-18-2017, 02:15 AM   #1497
zab0
Junior Member
zab0 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Mar 2017
Device: kobo aura
@mariosipad
Quote:
Originally Posted by mariosipad View Post
Even on slow systems (Raspberry Pi 1) I did not notice a slowdown when using a .htaccess file with cops
Quote:
Originally Posted by mariosipad View Post
What else from the .htaccess file do you want to put in a apache config file?
I've only partially tried it, but it should be possible.
That's exactly why I'd want to get rid of.htaccess file and put all his instructions in the server main config file. It gets loaded only once, as I understand.
As said, pasting the whole content into .conf file, wrapped into <directory> tags didn't work (I got the 404 again), but maybe I could copy only the instructions i need and switch the override directive back to None.

Last edited by zab0; 03-18-2017 at 02:24 AM.
zab0 is offline   Reply With Quote
Old 04-02-2017, 03:36 PM   #1498
vlad59
Addict
vlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five wordsvlad59 can name that ebook in five words
 
Posts: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
COPS 1.1.0

After many visible changes in the previous versions, here is COPS 1.1.0 where most of the changes are under the hood.

* Upgraded to PHPMailer 5.2.21.
* Merged a huge PR that clean most of COPS source code. Thanks to Markus Birth for his work and his patience.
* Updated German, Greek, Italian, Polish, Romanian, Russian, Turkish translations. Check Transifex for the authors.
* Fixed a bad external dependency in login.html causing problem with HTTPS. Thanks to polytan02.
* Fixed minor gui nitpick.
* Added automatic redirection to the OPDS feed for many new Android apps (see #309). Thanks to horus68.
* Added a configuration item to set the mail subject.

The biggest change is the switch to composer. So if you use a PHP version > 5.6 then the upgrade should be painless. If you use an older version then you may have some problem, please open an issue at Github.

One other thing, for the first time in years, I did not checked this forum at all for the last 4 months so if you find an error, please open an issue on Github.
vlad59 is offline   Reply With Quote
Old 04-06-2017, 07:37 AM   #1499
MontyJ
Addict
MontyJ began at the beginning.
 
Posts: 224
Karma: 10
Join Date: Jul 2012
Device: Kindle
Quote:
Originally Posted by iostrym View Post
Thanks. you copy paste of the calibre database is done from the NAS right ?

mine is done from windows to the nas, I guess this is why access rights are messy when the synchronization is done...
No, the rsync job copies the 'as is' Calibre database from a mounted drive in my Linux system to the NAS.

I have done nothing special on the NAS other than made sure the backup folder there is 'shared'.
MontyJ is offline   Reply With Quote
Old 04-27-2017, 06:12 PM   #1500
mariosipad
Guru
mariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watchmariosipad is clearly one to watch
 
Posts: 719
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
@zab0
Did you ever succeed?
mariosipad is offline   Reply With Quote
Reply

Tags
calibre opds, dns, kobo aura, synology


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre OPDS server with windows apps? nickdma Related Tools 10 03-03-2024 02:53 PM
[Old Thread] Android FBreader and Calibre OPDS server question kalex Calibre 5 12-24-2015 10:16 PM
PHP+Apache web server for calibre ... chaley Related Tools 254 04-28-2014 08:18 PM
External OPDS catalogue in Calibre bolton Calibre 1 09-05-2012 06:14 AM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM


All times are GMT -4. The time now is 06:50 AM.


MobileRead.com is a privately owned, operated and funded community.