if not os.path.exists(siginfo):
         bb.siggen.dump_this_task(siginfo, d)
     else:
-        os.utime(siginfo, None)
+        try:
+            os.utime(siginfo, None)
+        except PermissionError:
+            pass
 
     return
 
 sstate_create_package () {
        # Exit early if it already exists
        if [ -e ${SSTATE_PKG} ]; then
-               touch ${SSTATE_PKG}
+               [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
                return
        fi
 
        else
                rm $TFILE
        fi
-       touch ${SSTATE_PKG}
+       [ ! -w ${SSTATE_PKG} ] || touch ${SSTATE_PKG}
 }
 
 python sstate_sign_package () {
         if not os.path.exists(siginfo):
             bb.siggen.dump_this_task(siginfo, d)
         else:
-            os.utime(siginfo, None)
+            try:
+                os.utime(siginfo, None)
+            except PermissionError:
+                pass
+
 }
 
 SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"