[Koha-devel] writing a file on server from staff interface

Mark Tompsett mtompset at hotmail.com
Tue Sep 24 22:24:24 CEST 2013


Greetings,

Chown the files: 664, and make the group www-data (or whatever group the 
script will end up running as). 666 is just evil. Pun intended. Though, 
limiting exposure of an entire configuration file by only modifying a single 
system preference is clearly a more secure idea.

GPML,
Mark Tompsett


-----Original Message----- 
From: Mathieu Saby
Sent: Tuesday, September 24, 2013 3:31 PM
To: Koha Devel
Subject: [Koha-devel] writing a file on server from staff interface

Hi
for my patch about facets, I currently have 2 problems :
1- how to put the file in /etc/ of installation directory (in discussion)
2- how to allow the perl script (from staff interface) to write or
rewrite the yaml configuration file if a librarian decides to change
some settings.

If I do nothing special, YAML::DumpFile fails to (re)write the file,
because -  I suppose - the apache user does not have rights to access
the server.
So, for the moment, the only way I found to make my config file editable
is "chmod 666".
But  I suppose it is not very safe...

Do you know if there is a safer way to do that?  How is managed for
example for SolR configuration files?

Regards
Mathieu

-- 
Mathieu Saby
Service d'Informatique Documentaire
Service Commun de Documentation
Université Rennes 2
Téléphone : 02 99 14 12 65
Courriel : mathieu.saby at univ-rennes2.fr

_______________________________________________
Koha-devel mailing list
Koha-devel at lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/ 



More information about the Koha-devel mailing list