Re: [AD] RE: [AD] default file permissions (unix) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Mon, 15 Jul 2002, Laurence Withers wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 15 July 2002 10:31, Vincent Penquerc'h wrote:
> > I think other-writeable are a bit over the top. How about 664 ?
> > That will probably be umasked anyway in most cases, but still ?
>
> But what if I want other users to be able to write the file, and I have
> set my umask appropriately? Then it will seem like Allegro ignores the
> umask. I just tested `touch', and it follows umask exactly, so at least
> there is a precedent.
It creates the file with (right from the source):
open (file, O_WRONLY | O_CREAT | O_NONBLOCK | O_NOCTTY,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
which is mode 0666. I think that Allegro should do the same. Or, if we
want to be paranoid, it can test for geteuid() != 0 and otherwise use
0600.
Have a nice day.
Stepan Roh