Bug 7448 - Files created by koha-dump have different owners/permissions
Summary: Files created by koha-dump have different owners/permissions
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Robin Sheat
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 19:31 UTC by Magnus Enger
Modified: 2014-12-07 20:03 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-01-16 19:31:41 UTC
Here is a sample, for an instanace called "esme":

-rw-r----- 1 root esme-koha 147K Jan 11 12:27 esme-2012-01-11.sql.gz
-rw------- 1 root root      153K Jan 11 12:27 esme-2012-01-11.tar.gz

The database file gets this treatment: 

chown "root:$name-koha" "$dbdump"
chmod g+r "$dbdump"

while the other file does not get anything similar.
Comment 1 Robin Sheat 2012-01-16 20:08:31 UTC
It's semi-deliberate. Our Koha deployments have a feature that allows the superlibrarian to download the .sql.gz file[0], so it needs to be readable by the webserver. However, there is no need of this for the .tar.gz as it will be server config dependent, or derived data. So it's not made readable by the webserver.

[0] One day I plan to upstream this, but it's fiddly as it depends on the setup of the server. I might do it as package-specific patches maybe.
Comment 2 Magnus Enger 2012-01-16 20:31:25 UTC
(In reply to comment #1)
Semi-deliberate, eh? ;-) I'm not sure what makes sense if we try to generalize it, though....

> [0] One day I plan to upstream this, but it's fiddly as it depends on the setup
> of the server. I might do it as package-specific patches maybe.

How about having it governed by a syspref that defaults to "off" but can be set to "on" by koha-create (or a wrapper script for koha-create)?
Comment 3 Robin Sheat 2012-01-16 20:46:02 UTC
Setting sysprefs with koha-create is tricky, as it may not be creating the DB. However, the package patches could alter the default SQL for sysprefs.
Comment 4 Robin Sheat 2012-02-01 00:34:38 UTC
Actually, additional to this, pains must be taken to avoid it being accessible by the webserver, as there may be sensitive config and log related material in there.