diff --git a/src/python/dm/ds_web_service/service/impl/experimentManager.py b/src/python/dm/ds_web_service/service/impl/experimentManager.py index 2fc3d0af0f86ada1a44a0c3dccfc57e6d2b8f4bd..c44acf938e30fc45a1ac9f295267122d8196808c 100755 --- a/src/python/dm/ds_web_service/service/impl/experimentManager.py +++ b/src/python/dm/ds_web_service/service/impl/experimentManager.py @@ -140,10 +140,12 @@ class ExperimentManager(Singleton): OsUtility.chmodPath(filePath, fileMode=self.FILE_PERMISSIONS_MODE) self.logger.debug('Changing group owner for %s to %s' % (filePath, experimentName)) self.platformUtility.changePathGroupOwner(filePath, experimentName) + # Recursively modify subdirectory permissions dirPath = os.path.dirname(filePath) - if dirPath != storageDirectory: + while (os.path.abspath(dirPath) != os.path.abspath(storageDirectory)): self.logger.debug('Changing group owner for experiment subdirectory %s to %s' % (dirPath, experimentName)) self.platformUtility.changePathGroupOwner(dirPath, experimentName) + dirPath = os.path.dirname(dirPath) self.logger.debug('Processing file %s' % filePath) self.fileProcessingManager.processFile(fileInfo)