Loading .gitignore +3 −1 Original line number Diff line number Diff line ##### file_catalog/db_connector.py file_catalog/node.py transfer_service/store_preprocessor.py +9 −3 Original line number Diff line number Diff line # TODO: # - permissions setup on folder # - inteface with the file catalog (insert) # - data cleanup # - data and permissions cleanup # import os Loading Loading @@ -34,6 +33,13 @@ class StorePreprocessor(object): def prepare(self, username): self.username = username self.path = "/home/" + username + "/store" for folder, subfolders, files in os.walk(self.path): for s in subfolders: os.chown(os.path.join(folder, s), 0, 0) os.chmod(os.path.join(folder, s), 0o555) for f in files: os.chown(os.path.join(folder, f), 0, 0) os.chmod(os.path.join(folder, f), 0o555) def start(self): [ dirs, files ] = self.scan() Loading Loading @@ -68,7 +74,7 @@ class StorePreprocessor(object): else: sys.exit("The 'store' directory is empty.") # Test sp = StorePreprocessor() sp.prepare("cristiano") sp.start() Loading
.gitignore +3 −1 Original line number Diff line number Diff line ##### file_catalog/db_connector.py file_catalog/node.py
transfer_service/store_preprocessor.py +9 −3 Original line number Diff line number Diff line # TODO: # - permissions setup on folder # - inteface with the file catalog (insert) # - data cleanup # - data and permissions cleanup # import os Loading Loading @@ -34,6 +33,13 @@ class StorePreprocessor(object): def prepare(self, username): self.username = username self.path = "/home/" + username + "/store" for folder, subfolders, files in os.walk(self.path): for s in subfolders: os.chown(os.path.join(folder, s), 0, 0) os.chmod(os.path.join(folder, s), 0o555) for f in files: os.chown(os.path.join(folder, f), 0, 0) os.chmod(os.path.join(folder, f), 0o555) def start(self): [ dirs, files ] = self.scan() Loading Loading @@ -68,7 +74,7 @@ class StorePreprocessor(object): else: sys.exit("The 'store' directory is empty.") # Test sp = StorePreprocessor() sp.prepare("cristiano") sp.start()