Join GitHub today
COPS on Synology
This Howto describes how COPS can be installed on a Synology NAS box
A package is available though http://www.synocommunity.com/.
You may have to change your open_basedir parameter like it's explained afterwards.
If you're using DSM 5 please read the FAQ.
if you're using DSM 6: Install package "Web Station", the settings are there AND give the group http read access to the ebooks shared folder.
1) On Synology, enable Web Station
Control Panel -> Web Services -> Web Applications Tab: "Enable Web Station". Checked the following boxes: "Enable PHP Cache" and "Enable PHP safe mode..." [This option does not exist in DSM 6.0.1-7393_1]
2) Change your open_basedir
I choose to install in a shared folder named "logiciel" and the full path is :
I had to go to Control Panel -> Web Services -> Web Applications and Customise PHP open_basedir to append :
You'll have to load your Calibre database to your shared folder and set permission to the new 'http' group if your database is not found
3) If needed, edit the file "config_local.php"
$config['calibre_directory'] = '/volume1/logiciel/feedbook/';
If you use at least DSM 4.1 you can also enable URL rewriting :
$config['cops_use_url_rewriting'] = "1";
4) Avoid default 'public' shared folder
Note that the default 'public' shared folder cannot be used for your Calibre database. It seems to create access issues. Avoid it in order to allow COPS to work fine.
5) Other access issues
When your database is not on level 1 of a shared folder this might create access issues when folder traversing is not enabled for the http group.
Access errors when trying to use the folder /volume1/Library/CalibreLibrary/
SynoCommunity packages only set permissions on the lowest directory level for the library. This is most likely where the issue lies: the http user tries to access CalibreLibrary, but cannot get past Library because it doesn't have access on that dir.
Set at least traverse folders permissions (under custom, or set the whole read permissions set) for the http user to the folder Library. Alternatively, put your library a directory level higher (i.e. directly in a shared folder)
If you have done all these steps and still get a "metadata.db not found" error, this may be because the Web Station setting for open_basedir is being overridden by another PHP settings file. You can try to fix this by manually appending the library directory to the open_basedir variable in the file /usr/local/etc/php56/conf.d/user-settings.ini
For more info, see the following post:
6) How to set folder traversing for the http user
- File Station
- Select 'YOUR/OWN/SUB/FOLDER/'
- Right mouse click -> Properties
- Permissions tab
- Group: 'http'
- Copy from: none
- Apply to: All
- Permissions: Check every box under 'READ'