Serving irssi log files over local network with Lighttpd

0

I wish to use Lighttpd to serve some Irssi log files over a local network - [for my own private use].

Irssi can't write to /var/www/, and I don't think changing permissions is the 'right' way to do things.

Is there a 'typical' way around this?

I tried softlinking the irclogs folder to /var/www/ but Lighttpd wouldn't serve them.

I have set

server.document-root = /home/user/irclogs/ 

but that just serves up the generic welcome page. Typing in an individual log filename results in a not found error, as does a test.txt filename.

Copying the directory with a cron job seems like a waste ...

I am looking for advice on how to do this, or on how to debug the attempts I made.

Jack

Posted 2014-05-22T21:38:42.770

Reputation: 123

Answers

0

Why not change the permissions? Permissions are there to use them. And this is a fine example of where group permissions are useful.

Try using a log directory with read+write permissions for your irssi user and read permissions for your web server user.

You could of course add an additional group for that purpose and put the web servers user into that group.

Example:

Folder /var/www/irclogs

Permissions:

User: [irssi-user]

Group: [web server group]

Mode (Folder): 0750

Mode (Files): 0640

That way your web server can read the files, irssi can read+write the files and no one else can access them(unless you set the mode to something else).

Izzy

Posted 2014-05-22T21:38:42.770

Reputation: 273