On 18.04.2010, at 14:10, Sascha Silbe wrote:
> 
> On Sat, Apr 17, 2010 at 09:26:23PM -0400, George Hunt wrote:
> 
>> 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).
> 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).
> 
>> Rainbow changes UID for every invocation [...]
> 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/permissions.info, containing "constant-uid" on a single line.
> This is the least preferable solution, though.
> 
>> Apparently the create mask rainbow uses is 755 and group members do not have 
>> write access.
> It's not Rainbow that decides this.

But arguably Rainbow could set a better default, no? Making files 
group-writable?

Have to admit I forgot how the sticky bits on the data dir affects this though. 

> 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).

When running in Rainbow, setting "umask 0002" shouldn't hurt in general.

Hmm, how do I test if Rainbow is enabled, in a shell script, again?

- Bert -

> 
> [1] http://wiki.laptop.org/go/Activity_bundles#activity.2Fpermissions.info
> 
> CU Sascha
> 
> -- 
> http://sascha.silbe.org/
> http://www.infra-silbe.de/_______________________________________________
> Devel mailing list
> Devel@lists.laptop.org
> http://lists.laptop.org/listinfo/devel


_______________________________________________
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel

Reply via email to