On Fri, Aug 28, 2009 at 3:25 PM, Koen Deforche<[email protected]> wrote:
> Hey Pau,
>
> 2009/8/28 Pau Garcia i Quiles <[email protected]>:
>>> 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).
>
> But that is quite impolite to alternative web servers (lighttpd, nginx, ...).

I guess those web servers do have their own init script which creates
a directory in /var/run (i. e. /var/run/nginx, /var/run/lighttpd,
etc). Maybe FastCGI provides a function to find out the path of the
runtime directory :-?

> Currently the path is a configuration option in wt_config.xml, so a
> user can easily change the path.

I agree but I think it should be recommended that the path not be
/var/run/wt because it will not be available unless the user has
created it manually, which won't usually happen. For the same reason,
the default path should not be /var/run/wt but /tmp/wt or alike (the
FHS requires that /tmp be given 1777 permissions).

> What we could do is when the directory does not exist, at least try to
> create it before failing. The binary itself cannot do any better ?

I agree.

-- 
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