librelist archives

« back to archive

Re : Logging et section acl de radicale

Re : Logging et section acl de radicale

From:
Vincent Cadet
Date:
2011-10-09 @ 19:57
** Please advise  me if this message shall be re-written in English. **

Bonjour.


J'ai eu connaissance de radicale par le forums de linuxfr ( 

http://linuxfr.org/forums/g%C3%A9n%C3%A9ralcherche-logiciel/posts/serveur-de-calendrier-utilisable-avec-thunderbirdlightning

).

Suite à l'invitation de liZe ( http://linuxfr.org/users/lize ), voici mes 
questions.

Mon serveur  est un Debian Squeeze sur lequel tourne Roundcube (sous SSL) avec 
authentification LDAP gérée par Apache. C'est sur ce serveur et sous Apache 
que je souhaiterais utiliser Radicale mais je n'en suis pas encore là.

J'ai besoin d'un accès authentifié à des calendriers partagés, 
exclusivement. Les calendriers personnels ne sont pas nécessaires.

1. En ce qui concerne la notion d'utilisateurs: y a-t'il une relation 
entre les utilisateurs mentionnés dans public_users, private_users et les 
utilisateurs du système?

2. Dès que j'ajoute "type = None" à la section [acl], radicale ne 
démarre plus (en mode daemon).

3. Je ne suis pas encore parvenu à générer un fichier de log avec radicale, ce 
qui rend le diagnostic de 2. difficile.

4. Quelles sont les fonctionnalités CalDAV qui risquent de ne pas fonctionner si 
radicale s'exécute en tant que script WSGI avec Apache?

5. J'ai un énorme fichier calendrier provenant de phpicalendar que je 
souhaite importer dans le répertoire de radicale. J'ai constaté que le 
contenu du fichier est légèrement différent (présence de certains éléments 
X-***, par exemple). Y a-t-il des précautions particulières à prendre pour la 
conversion?


Pour le moment, je lance radicale à la ligne de commande avec root, pour mes 
essais.

Mes calendriers sont stockés dans /var/lib/radicale et je voudrais que le 
fichier log /var/log/radicale soit utilisé par le script, tant en mode daemon 
que sous Apache.

Merci pour toute suggestion.

Vincent C.

[radicale] Re: Logging and ACL section

From:
Guillaume Ayoub
Date:
2011-10-09 @ 22:50
> Bonjour.

Hello Vincent,

>** Please advise me if this message shall be re-written in English. **

English is better here. I'll rewrite your message in English, no
problem :).

> J'ai eu connaissance de radicale par le forums de linuxfr ( 
> 
http://linuxfr.org/forums/g%C3%A9n%C3%A9ralcherche-logiciel/posts/serveur-de-calendrier-utilisable-avec-thunderbirdlightning

> ).

I've discovered Radicale on LinuxFR's forum (
http://linuxfr.org/forums/g%C3%A9n%C3%

A9ralcherche-logiciel/posts/serveur-de-calendrier-utilisable-avec-thunderbirdlightning

).

> Suite à l'invitation de liZe ( http://linuxfr.org/users/lize ), voici mes 
> questions.

Following liZe's invitation (http://linuxfr.org/users/lize ), here are
my questions.

> Mon serveur  est un Debian Squeeze sur lequel tourne Roundcube (sous SSL) avec 
> authentification LDAP gérée par Apache. C'est sur ce serveur et sous Apache 
> que je souhaiterais utiliser Radicale mais je n'en suis pas encore là.

My server is running Debian Squeeze with Roundcube (SSL) with LDAP
authentication managed by Apache. That's on this server and under Apache
that I'd like to use Radicale, but I'm not at this point yet.

> J'ai besoin d'un accès authentifié à des calendriers partagés, 
> exclusivement. Les calendriers personnels ne sont pas nécessaires.

I need an authenticated access to shared calendars only. Personal
calendars are not needed.

> 1. En ce qui concerne la notion d'utilisateurs: y a-t'il une relation 
> entre les utilisateurs mentionnés dans public_users, private_users et les 
> utilisateurs du système?

1. About the users, is there a relation between the users given in
public_users, private_users and the system users?

Answer:

The users given in public_users and private_users are related to the
users of the ACL system you chose. If you use a LDAP authentication
system ([acl] type=LDAP), the users are the LDAP users. If you use PAM
(type=PAM), the users are your unix system users.

> 2. Dès que j'ajoute "type = None" à la section [acl], radicale ne 
> démarre plus (en mode daemon).

2. When I add "type = None" to the [acl] section, Radicale does not
start (in daemon mode).

Answer:

That's really strange, I've never met this error before. If you still
experience your problem, please open a bug report
( http://redmine.kozea.fr/projects/radicale/issues ).

> 3. Je ne suis pas encore parvenu à générer un fichier de log avec radicale, ce 
> qui rend le diagnostic de 2. difficile.

3. I did not manage yet to get a log file with Radicale, making question
#2 hard to diagnose.

Answer:

The path of the logging configuration file can be changed in the main
configuration file, in [logging] → config.

An example of logging configuration file is given in the user
documentation
( http://radicale.org/user_documentation/#logging-configuration-file ).
You can easily adapt this sample to your needs, but without changing a
line, you'll get a debug logging file in /var/log/radicale (please check
that you have the right to write in /var/log/).

> 4. Quelles sont les fonctionnalités CalDAV qui risquent de ne pas 
fonctionner si 
> radicale s'exécute en tant que script WSGI avec Apache?

4. Which CalDAV features may not work if Radicale is launched as a WSGI
script with Apache?

Answer:

Everything should work with Apache, but you have to check a couple of
things, as explained in the documentation
( http://radicale.org/user_documentation/#apache-and-mod-wsgi ):

- Logs only work if you start the logging mechanism in the WSGI file.
- Use authentication with Apache, not with Radicale. If you *need* to
use the Radicale authentication methods, set "WSGIPassAuthorization On"
in the Apache configuration file.

Of course, if you use Apache, the [server] part of the configuration
file is useless, as these options are managed by Apache (SSL for
example).

> 5. J'ai un énorme fichier calendrier provenant de phpicalendar que je 
> souhaite importer dans le répertoire de radicale. J'ai constaté que le 
> contenu du fichier est légèrement différent (présence de certains éléments 
> X-***, par exemple). Y a-t-il des précautions particulières à prendre pour la 
> conversion?

5. I've got a huge calendar file coming from phpicalendar that I'd like
to import in Radicale's folder. I've seen that the file content is a bit
different (some X-*** elements are present, for example). Are there any
particular precautions to take to convert them?

Answer:

No. Of course, you'd better backup them before putting them in the
Radicale's folder, but I'm sure that you already know that ;).

If you don't want to use phpicalendar anymore with this file, you can
even safely remove the X-*** elements, they're useless (unless they've
been added by your clients).

> Pour le moment, je lance radicale à la ligne de commande avec root, pour mes 
> essais.
> 
> Mes calendriers sont stockés dans /var/lib/radicale et je voudrais que le 
> fichier log /var/log/radicale soit utilisé par le script, tant en mode daemon 
> que sous Apache.

For now, I'm launching Radicale in a command line as root, to try it.

My calendars are stocked in /var/lib/radicale and I'd like my log
file /var/log/radicale to be used by the script, both in daemon mode and
with Apache.



General answers about your general needs
========================================

Using Radicale with Apache is quite easy, but not *that* easy. Here are
some good advices:

- Be really, really, *really* careful with the read and write modes of
configuration files, calendars and logs, moreover as you try Radicale as
root. Bad rights give really strange errors with Radicale, really hard
to debug.
- Use the authentication methods offered by Apache.
- Don't forget "radicale.log.start()" in your ".wsgi" file.
- Stocking your calendars in /var/lib/radicale and your logs
in /var/log/radicale is a good architecture if you use Apache. You can
put your configuration file in /etc/radicale/config, and your logging
configuration file in /etc/radicale/logging.



> Merci pour toute suggestion.

I hope that these answers were useful!

Kind regards,
--
Guillaume (aka. liZe)

Re : [radicale] Re: Logging and ACL section

From:
Vincent Cadet
Date:
2011-10-10 @ 18:46
Thank you very much, Guillaume.

I am trying to use radicale as WSGI. I'm having other issues now.


> Using Radicale with Apache is quite easy, but not *that* easy. Here are
> some good advices:
> 
> - Be really, really, *really* careful with the read and write modes of
> configuration files, calendars and logs, moreover as you try Radicale as
> root. Bad rights give really strange errors with Radicale, really hard
> to debug.
> - Use the authentication methods offered by Apache.

Fair enough. That's what I intend to do.


> - Don't forget "radicale.log.start()" in your ".wsgi" 
> file.

I entirely copied/pasted the example WSGI file from Radicale web site, i.e.:

import radicale radicale.log.start() application = 
radicale.Application()And I saved this script as /var/www/radicale.wsgi

Now when I browse the expected URL 
(https://myhost.example.com/username/calendar) I get the following error 
in Apache error log:


mod_wsgi (pid=371): Target WSGI script '/var/www/radicale.wsgi' cannot be 
loaded as Python module.
mod_wsgi (pid=371): Exception occurred processing WSGI script 
'/var/www/radicale.wsgi'.
Traceback (most recent call last):
  File "/var/www/radicale.wsgi", line 2, in <module>
    radicale.log.start()
AttributeError: 'module' object has no attribute 'log'

I never used WSGI though. Is there something I have missed? I'd say 
radicale seems to be installed as a python module, as far as I have 
understood with my limited knowledge of Python:

/usr/lib/pymodules/python2.6/radicale   and in
/usr/share/pyshared/radicale


> - Stocking your calendars in /var/lib/radicale and your logs
> in /var/log/radicale is a good architecture if you use Apache. You can
> put your configuration file in /etc/radicale/config, and your logging
> configuration file in /etc/radicale/logging.

Good. That's exactly what I have done. Here are the perms:

-rw-r--r-- 1 www-data root 0 Oct  9 10:02 /var/log/radicale

See? It's still 0. But given the errors I am receiving, I think it's no surprise.

Thanks a lot for your help,
Vincent

[radicale] Re: Logging and ACL section

From:
Vincent Cadet
Date:
2011-10-15 @ 20:12
I finally found why I had these error messages:


>mod_wsgi (pid=371): Target WSGI script '/var/www/radicale.wsgi' cannot be
loaded as Python module.
>mod_wsgi (pid=371): Exception occurred processing WSGI script 
'/var/www/radicale.wsgi'.
>Traceback (most recent call last):
>  File "/var/www/radicale.wsgi", line 2, in <module>
>    radicale.log.start()
>AttributeError: 'module' object has no attribute 'log'


Debian Squeeze installs Radicale version 0.3.2! But WSGI wasn't introduced
until version 0.6! I'm going to try that one. There doesn't seem to be 
such package for Debian though, not a big deal anyhow.

Thanks for your help. Maybe I'll post again if I have issues.

Vince C.