> Nevertheless, if I try to make a log file it is only readable for the
> linux user that started the java application. And this not always the
> user that will try to read the log file. So what could I do?
The default file creation mode is determined by the user's umask. If
you want to change the default file permissions, change the umask in
the user's shell before running the application. "man umask" will tell
you more.
Or use Runtime.exec() after creating the file to invoke a linux
specific utility (chmod) to let other users read the file.
If the file is (already) readable by members of the file's *group*,
you might also add (specific) users to that group so they can read the
file.
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
marcwentink@hotmail.com - 06 Apr 2006 14:53 GMT
Gordon Beaton:
> Or use Runtime.exec() after creating the > file to invoke a linux
Ok, that's a good idea. Thank you very much
And if I use it like +/- this code below 'chmod' will only be used once
every java VM machine call.
class LogIt
{
private static File file;
private static BufferedWriter out;
static
{
open();
Runtime.exec()
}
Marcus Wentink