diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index 0af41a64a..de8521768 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -578,10 +578,11 @@ class EntropyRepository(EntropyRepositoryBase): Reimplemented from EntropyRepositoryBase. """ if (not self._readonly) and (self._db_path != ":memory:"): - # make sure that user can write to file - # before returning False, override actual - # readonly status - return not os.access(self._db_path, os.W_OK) + if os.getuid() != 0: + # make sure that user can write to file + # before returning False, override actual + # readonly status + return not os.access(self._db_path, os.W_OK) return self._readonly def setIndexing(self, indexing):