Re: file permission problem
"Pascal J. Bourguignon" <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Organization | Informatimago |
| Message-ID | <[email protected]> |
[email protected] (Don Cohen) writes: >> yet another in my series of inane problems - >> I'm trying to create files that are read/write by group (in linux). >> I've managed to get these things to work as desired: >> >> echo "hi" > /home/cmcadm/data2009/mb3 >> => >> -rw-rw----. 1 marilyn cmcadm 3 Aug 11 10:14 mb3 >> >> touch ~cmcadm/data2009/mb >> => >> -rw-rw----. 1 marilyn cmcadm 0 Aug 10 22:15 mb >> >> and yet in clisp ... >> >> [1]> (with-open-file (s "/home/cmcadm/data2009/mb2" :direction :output)) >> NIL >> => >> -rw-r-----. 1 marilyn cmcadm 0 Aug 11 10:13 mb2 >> >> What am I missing? > > Those are NOT Common Lisp notions. > > File modes, user, group, other, etc are POSIX notions. > So how would you do in C? > As far as I can tell you'd set umask - but that's already done. > The question is why clisp acts differently from touch. > These are all done from the same login and same environment. > > If you've found that you could use the process umask to configure the > default mask used when creating files, then you know what should ask > clisp about: > > (apropos "UMASK" "POSIX") > (describe 'posix:umask) > which seems to only allow me to set it, not read it, btw Read: man 2 umask While one might say that the impnotes is deficient for not precising the result of POSIX:UMASK, (you may post a bug report), it should be obvious what it returns, knowing what umask(2) does. -- __Pascal Bourguignon__ http://www.informatimago.com/ “The factory of the future will have only two employees, a man and a dog. The man will be there to feed the dog. The dog will be there to keep the man from touching the equipment.” -- Carl Bass CEO Autodesk ------------------------------------------------------------------------------ _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list