Create directories in ~/.gap
Index: gap-atlasrep-2.1.10/init.g
===================================================================
--- gap-atlasrep-2.1.10.orig/init.g
+++ gap-atlasrep-2.1.10/init.g
@@ -3,6 +3,24 @@
 #W  init.g               GAP 4 package AtlasRep                 Thomas Breuer
 ##
 
+if UserPreference( "AtlasRep", "AtlasRepDataDirectory") = fail then
+  CallAndInstallPostRestore(function()
+    Perform(["datagens", "dataword", "dataext"], function(dirname)
+      local package, l, dir;
+      package := "AtlasRep";
+      dir := GAPInfo.UserGapRoot;
+      for l in ["","pkg",package,dirname] do
+        dir := Concatenation([dir,"/",l]);
+        if not IsDirectoryPath(dir) then
+          CreateDir(dir);
+        fi;
+      od;
+      return 0;
+    end);
+    SetUserPreference( "AtlasRep", "AtlasRepDataDirectory",Concatenation(GAPInfo.UserGapRoot,"/pkg/AtlasRep/"));
+  end);
+fi;
+
 # Read the declaration part.
 ReadPackage( "atlasrep", "gap/userpref.g"  );
 ReadPackage( "atlasrep", "gap/bbox.gd"     );
Index: gap-atlasrep-2.1.10/gap/access.gi
===================================================================
--- gap-atlasrep-2.1.10.orig/gap/access.gi
+++ gap-atlasrep-2.1.10/gap/access.gi
@@ -2780,22 +2780,16 @@ AGR.CreateLocalJSONFile:= function( diri
     fi;
     datadir:= Concatenation( pref, "dataext/", dirid );
     if not IsDirectoryPath( datadir ) then
-      # Create the subdirectory 'dirid' and set the mode 1023.
+      # Create the subdirectory 'dirid' and set the mode 511.
       # (Note that 'mkdir' does not guarantee the required mode,
       # so we call 'chmod' afterwards.)
       if not IsPackageMarkedForLoading( "IO", "" ) or
-         IO_mkdir( datadir, 1023 ) <> true then
+         IO_mkdir( datadir, 511 ) <> true then
         Info( InfoAtlasRep, 1,
               "AtlasOfGroupRepresentationsNotifyData:\n",
               "#I  'IO_mkdir' cannot create the local directory\n",
               "#I  ", datadir );
         return fail;
-      elif IO_chmod( datadir, 1023 ) <> true then
-        Info( InfoAtlasRep, 1,
-              "AtlasOfGroupRepresentationsNotifyData:\n",
-              "#I  'IO_chmod' cannot set the mode of \n",
-              "#I  ", datadir, " to 1023" );
-        return fail;
       fi;
     fi;
 
