diff --git a/src/libstore/store.cc b/src/libstore/store.cc
index 5b471a1d9cd8dc71025fffe5f9d6c2eef6836491..1f05b63a6cce8cb720c58e1be9d659d84bac4be6 100644
--- a/src/libstore/store.cc
+++ b/src/libstore/store.cc
@@ -448,6 +448,8 @@ Path addToStore(const Path & _srcPath)
             
             copyPath(srcPath, dstPath);
 
+            makePathReadOnly(dstPath);
+            
             Transaction txn(nixDB);
             registerValidPath(txn, dstPath);
             txn.commit();
@@ -476,6 +478,8 @@ void addTextToStore(const Path & dstPath, const string & s)
 
             writeStringToFile(dstPath, s);
 
+            makePathReadOnly(dstPath);
+            
             Transaction txn(nixDB);
             registerValidPath(txn, dstPath);
             txn.commit();