Sascha,<br><br>I'll plan to put the history in the Journal -- seems like a good idea.<br><br>I had looked for an input mechanism to Rainbow's CONSTANT_RAINBOW_UID without success. So thanks for your pointer. <br><br>
I'm curious to know why you think using a constant UID is undesireable. At this point I'm looking for ways to simplify the next stages of debugging my program. <br><br>My thinking is as follows: If I can get permissions off the table as a source of failure, while I deal with all the other problems I haven't foreseen, I can come back and tighten up security when my code is more solid.<br>
<br>With much appreciation for your help,<br>George<br><br><div class="gmail_quote">On Sun, Apr 18, 2010 at 8:10 AM, Sascha Silbe <span dir="ltr"><<a href="mailto:sascha-ml-ui-sugar-olpc-devel@silbe.org">sascha-ml-ui-sugar-olpc-devel@silbe.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Sat, Apr 17, 2010 at 09:26:23PM -0400, George Hunt wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am using an ipython console application which writes a history file to the home directory (I changed the HOME environment to SUGAR_ROOT/data).<br>
</blockquote></div>
Have you considered saving the history as part of the data store entry instead? That way your activity wouldn't mix histories from separate sessions (i.e. when debugging several different programs).<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Rainbow changes UID for every invocation [...]<br>
</blockquote>
Yes, that's the default behaviour. Rainbow can be instructed to use a constant UID (Browse does); according to the OLPC wiki [1] you'd need to add a file activity/<a href="http://permissions.info" target="_blank">permissions.info</a>, containing "constant-uid" on a single line.<br>
This is the least preferable solution, though.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Apparently the create mask rainbow uses is 755 and group members do not have write access.<br>
</blockquote></div>
It's not Rainbow that decides this. Permissions of newly created file system entries (i.e. files and directories) are determined by the umask (see e.g. "man 2 umask"). You can either widen the permissions after creation using chmod() (see "pydoc os.chmod") or tweak the umask (see "pydoc os.umask"); since the latter affects _all_ created files I would recommend the chmod() (you could save+restore the umask, but it's prone to race conditions).<br>
<br>
<br>
[1] <a href="http://wiki.laptop.org/go/Activity_bundles#activity.2Fpermissions.info" target="_blank">http://wiki.laptop.org/go/Activity_bundles#activity.2Fpermissions.info</a><br>
<br>
CU Sascha<br><font color="#888888">
<br>
-- <br>
<a href="http://sascha.silbe.org/" target="_blank">http://sascha.silbe.org/</a><br>
<a href="http://www.infra-silbe.de/" target="_blank">http://www.infra-silbe.de/</a></font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iQEcBAEBAgAGBQJLyvayAAoJELpz82VMF3Da4IoIAI+HUTUnCJWOrz0kk4reyDmh<br>
GaBNXbG/DbMSRf0EEKiXCVABzQahgKUFg7PKiIZY5xl+Qt5esPQ50KDlsPUZYG+K<br>
972H9/VNRo+kTOZ9JuYGDzKsexwowparXLH7QFL9wZNy/+5eA2vy/qH6kKlKrarZ<br>
Qki9Comwxh6aRKqXhlrTQn5/IXA0FoXySjx37T8jW+hJTRe05QfKIJrsUVTks/t7<br>
BnviPWfrJHip2LIDmsChrVDPsibUKBvC7hGV+iEsbCUSQKpt+Nf97jWw8eWL+pbx<br>
tmUfNAuuI9CGpgoFsrJjZ3PUR/fvrcDJb9CvXEDz0+VorZuRiSN7tE2883yIXzY=<br>
=X+wE<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br>