Le 10.01.2007, à 23:30:46, Greg Kochanski a écrit:
> Some of us are married, with kids, and complicated lives
> involving judo, piano lessons, and all kinds of family events.
> It would be nice if jpilot supported sharing a database
> between two or more users.
> 
> I manage it by a klugey procedure.   I symlink
> from ~me/.jpilot to ~spouse/.jpilot,
> and wrap jpilot in a script that
> calls chgrp and chmod to make sure that all the files
> in .jpilot are readable and writeable by the right group.
> 
> It would be nice to have some minor changes to jpilot
> to make this cleaner.
> 1) File locking.    And, for most purposes, the locking need not be
>       anything fancy.    Almost always, you can tap her on the shoulder
>       or phone her and say "Can you pop off for a minute?  I need to
>       enter a piano lesson."    All you really need is a notification
>       that someone else is running jpilot.      (Of course, fancy locking
>       or read-only modes or transactional stuff would be superb!)

jpilot already "supports" multiple running instances.
For example you can start two jpilot yourself. Using two different id is
not more different.

It has no locking mechanism AFAIK. So bad things may happen if the same
file is modified by two jpilot at the same time.

> 2) An option where database files can be given group rw permissions,

You can change the umask before starting jpilot.
Something like "umask 0002" should create files with group rw
permissions.

> 3) An option where jpilot will automatically set the group of
>     database files (including new ones that it creates) to a specified group.

do:
create a familly group and add all the familly members in it
$ chgrp familly ~/.jpilot
$ chgrp -R familly ~/.jpilot
$ chmod -R g+rw ~/.jpilot
$ chmod g+s $(find  ~/.jpilot -type d)

start jpilot with
$ (umask 0002 ; jpilot)

now
- every file is in group familly with rw access for the group
- every new file will be created with group familly (chmod g+s)


After reading the source code we have a problem. The code explicitely
calls:
   /* Enhance privacy by only allowing user to read & write files */
   chmod(fullname, 0600);
This will have to be removed so that the familly group can be used to
share data.


> 4) An option to select the directory in which the database resides
>       (but leave the preferences in ~/.jpilot).

Why? Just store the database any where you want and create a symlink for
~/.jpilot pointing to the real location.


I will report your request upstream. And see if a safe solution is
possible.

Bye,

-- 
 Dr. Ludovic Rousseau                        [EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --

Reply via email to