diff -ruN a/AmberTools/src/leap/src/leap/basics.c b/AmberTools/src/leap/src/leap/basics.c
--- a/AmberTools/src/leap/src/leap/basics.c	2026-11-23 11:09:09.040536378 +0300
+++ b/AmberTools/src/leap/src/leap/basics.c	2026-11-23 11:09:09.041872151 +0300
@@ -971,6 +971,14 @@
     if ( fFile != NULL ) 
 	return(fFile);
     iExistErr = 1;
+    /* Do not fall back to the data search path when creating files:
+       installed data directories are read-only on a normal system
+       (Gentoo FHS); write/append opens must be relative to the
+       current directory only. */
+    if ( sAttributes[0] == 'w' || sAttributes[0] == 'a' ) {
+    	iExistErr = 0;
+    }
+    else {
     for ( i=0; i<SiCurDirectory; i++ ) {
 	strcpy( GsBasicsFullName, SsaDirectories[i] );
 	strcat( GsBasicsFullName, "/" );
@@ -983,6 +991,8 @@
 	    iExistErr = 0;
 	}
     }
+    }
+
     if ( bComplain ) {
 	VPFATALEXIT(( "Could not open file %s: %s\n", sExpanded,
 			( iExistErr ? "not found" : "system error" )  ));
diff -ruN a/AmberTools/src/leap/src/leap/commands.c b/AmberTools/src/leap/src/leap/commands.c
--- a/AmberTools/src/leap/src/leap/commands.c	2026-11-23 11:09:09.040689616 +0300
+++ b/AmberTools/src/leap/src/leap/commands.c	2026-11-23 11:09:09.043324946 +0300
@@ -2501,13 +2501,15 @@
 
                 /* Open the new log file */
 
-    fLog = FOPENCOMPLAIN( sFilename, "a" );
+    fLog = FOPENNOCOMPLAIN( sFilename, "a" );
     if ( fLog != NULL ) {
         time_t  t = time( (time_t *)0 );
 
         fprintf(fLog, "log started: %s\n", ctime(&t) );
         VerbositySetLogFile( fLog );
         VP0(( "Log file: %s\n", GsBasicsFullName ));
+    } else {
+        VP0(( "Warning: could not create log file %s; continuing without a log file.\n", sFilename ));
     }
     return(NULL);
 }
