Re: links to logs in /etc? (/etc/postgresql/7.4/main/log)
On Tue, Jun 14, 2005 at 06:00:35PM +0200, Bernd Eckenfels wrote:
> In article <[🔎] 42AE88D7.email@example.com> you wrote:
> > ok, that's gotta be invalid argument since this could be argued for
> > ANY file so you would end up with links to EVERYTHING in /etc, so that
> > program would know where to find libraries, binaries, images, web pages
> > (hey! we need a way to store URLs in filesystem) etc.
> Why not? If those locations are runtime configurable, which makes great
> sense for scaleable database applications. Ever looked in /etc/alternatives?
wouter@country:~$ ls -l /usr/bin/awk
rwxr-xr-x 1 root root 21 2005-03-28 10:49 /usr/bin/awk -> /etc/alternatives/awk
wouter@country:~$ ls -l /etc/alternatives/awk
rwxr-xr-x 1 root root 13 2005-03-28 13:22 /etc/alternatives/awk -> /usr/bin/gawk
In other words, alternatives are *never* directly read from
/etc/alternatives; they are read from, e.g., /usr/bin/awk.
If you have a symlink /var/log/app.log -> /etc/app/log, then you're
fine. If your app is writing directly to /etc/app/log, you're not.
Why? Because otherwise your application tries to open a file which it
can lstat but not stat if whatever the symlink tries to write to is not
available for some reason (e.g., the file system is b0rked or not
The amount of time between slipping on the peel and landing on the
pavement is precisely one bananosecond