From 6bee76d5bb8fc9df41900ea77951012fb1cfd8ae Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 6 Jun 2012 08:17:15 +0000 Subject: [PATCH] Make lock files availble to all users for usage from php process --- etc/inc/util.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/inc/util.inc b/etc/inc/util.inc index d53b8852d7..45d9f72359 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -117,8 +117,10 @@ function lock($lock, $op = LOCK_SH) { global $g, $cfglckkeyconsumers; if (!$lock) die(gettext("WARNING: You must give a name as parameter to lock() function.")); - if (!file_exists("{$g['tmp_path']}/{$lock}.lock")) + if (!file_exists("{$g['tmp_path']}/{$lock}.lock")) { @touch("{$g['tmp_path']}/{$lock}.lock"); + @chmod("{$g['tmp_path']}/{$lock}.lock", 0666); + } $cfglckkeyconsumers++; if ($fp = fopen("{$g['tmp_path']}/{$lock}.lock", "w")) { if (flock($fp, $op))