write-file and umask

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

write-file and umask

Post by newdep »

Hi Lutz,

'write-file always creates an executable file output.
Would be more convienient if Newlisp would check the umask
of the current user or always put the file into 600.


> (write-file "count" "some text")
9
> (! "ls -al count")
-rwxr-xr-x 1 newdep users 9 2005-05-30 13:26 count
0
>


Norman.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Sounds reasonable, I can change that doing 'rw-rw-rw-' masked with umask

Lutz

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Note that this will not be in 8.6.0, due June 10th. I will add an optional permissions parameter to 'open' and 'write-file', but will do this after the release of 8.6.0

Lutz

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

No hurry's ;-)

Thanks...Norman
-- (define? (Cornflakes))

Locked