[py] Legacy Firefox driver: ensuring copy of profile dir, its 'extensions' subdir and 'user.js' file are writable. Fixes
@@ -77,9 +77,12 @@ class FirefoxProfile(object):
shutil.copytree(self.profile_dir, newprof,
ignore=shutil.ignore_patterns("parent.lock", "lock", ".parentlock"))
self.profile_dir = newprof
+ os.chmod(self.profile_dir, 0o755)
self._read_existing_userjs(os.path.join(self.profile_dir, "user.js"))
self.extensionsDir = os.path.join(self.profile_dir, "extensions")
+ os.chmod(self.extensionsDir, 0o755)
self.userPrefs = os.path.join(self.profile_dir, "user.js")
+ os.chmod(self.userPrefs, 0o644)
# Public Methods
def set_preference(self, key, value):
