[Sugar-devel] "Permission denied" error in ReckonPrimer Activity

Bernie Innocenti bernie at sugarlabs.org
Wed Apr 27 19:40:00 EDT 2011


On Thu, 2011-04-28 at 01:23 +0200, Christoph Derndorfer wrote: 
> I'm running into an odd issue with the ReckonPrimer Activity some
> Austrian students have developed for our pilot project.
> 
> 
> Starting the activity works fine on just about every software version
> I've tried but unfortunately fails on build 767 which is the one being
> used in the school at the moment (yes, I'm well aware that's quite
> outdated hence why I'm looking forward to 11.2.0 and its German
> support;-).
> 
> 
> In the log it says "IOError: [Errno 13] Permission denied:
> '/home/olpc/Activities/ReckonPrimer.activity/data/Collection.data'" (for the complete log please see the end of this e-mail) whereby the offending function is in collection.py (.xo file available at http://derndorfer.eu/files/permanent/ReckonPrimer-7.xo):
> 
> 
>     def set_data_in_pickle(self, root):
>         """ Sets data in pickle file """
>         path = os.path.join(os.getcwd(), "data/Collection.data")
>         f = open(path, "wb")
>         pickle.dump(root, f)
>         f.close()
> 
> 
> I really don't understand why this causes issues in 767 but none of
> the other (newer) software versions and I'd appreciate any pointers,
> thoughts or advice here. :-)

Hmm... what are the permissions on /home/olpc/Activities/ReckonPrimer.activity/data ?
Use "ls -l" to check. The directory must be owned by user olpc,
writable, executable by the user.

If everything seems in order, try creating the file in the directory
from the terminal:

touch /home/olpc/Activities/ReckonPrimer.activity/data/Collection.data 
If this works, I'd expect the application to also work.

Note that storing data in the activity directory will break with
Rainbow. There should be a per-application data directory somewhere
under .sugar/default.

-- 
Bernie Innocenti
Sugar Labs Infrastructure Team
http://wiki.sugarlabs.org/go/Infrastructure_Team




More information about the Sugar-devel mailing list