Commit a2e66fb1 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Merge branch 'testing'

parents 31238743 223588cd
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
#####
file_catalog/db_connector.py
file_catalog/node.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
@@ -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()
@@ -68,7 +74,7 @@ class StorePreprocessor(object):
        else:
            sys.exit("The 'store' directory is empty.")


# Test
sp = StorePreprocessor()
sp.prepare("cristiano")
sp.start()