On Fri, Aug 28, 2009 at 3:04 PM, Koen Deforche<[email protected]> wrote:
> Hey Pau,
>
> 2009/8/28 Pau Garcia i Quiles <[email protected]>:
>> On Fri, Aug 28, 2009 at 1:48 PM, Lasse Kärkkäinen<[email protected]> 
>> wrote:
>>> We have had an issue on our server: Wt apparently hangs and causes a
>>> large number of Apache processes to appear when the /var/run/wt folder
>>> is missing. Once the folder is created, the queued requests are
>>> processed and the access_log and error_log get flooded with
>>> corresponding lines.
>>>
>>> Ubuntu seems to remove the folder during reboot, so it being missing is
>>> quite common.
>>
>> What Ubuntu does is right, the Filesystem Hierarchy Standard says
>> "Files under this directory [/var/run] must be cleared (removed or
>> truncated as appropriate) at the beginning of the boot process" (
>> http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA
>> )
>>
>> Wt should check /var/run/wt exists and create it if it does not.
>
> Does any process have the rights to write there, then ?

No, /var/run is root-only. I can think of two solutions:

- Have a /etc/init.d/wt init script which creates /var/run/wt and does
nothing more, because there's no other need. Really ugly.

- If the Wt app is run as a FCGI module, it will have the permissions
of the user which runs Apache (www-data in Debian derivatives). When
Apache is started, by means of /etc/init.d/apache2 it will create
/var/run/apache2 and www-data has write permissions there. My
proposal: if the Wt app links with libwtfcgi, it should create
temporary files in /var/run/apache2 (or maybe even create
/var/run/apache2/wt and write there).

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to