diff --git a/python/LbNightlyTools/Scripts/Index.py b/python/LbNightlyTools/Scripts/Index.py
index ede433880d8b855499ba57d13b009940295e0fd0..97f17e8ed3cdc24b4f0e26adb471e4e181a3943e 100644
--- a/python/LbNightlyTools/Scripts/Index.py
+++ b/python/LbNightlyTools/Scripts/Index.py
@@ -176,7 +176,7 @@ class Script(BaseScript):
             for dirpath, _, filenames in os.walk(index_dir):
                 os.chmod(dirpath, 0755)
                 for filename in filenames:
-                    os.chmod(filename, 0644)
+                    os.chmod(join(dirpath, filename), 0644)
             self.log.info('packing indexes for %s...', proj)
             pack([proj.baseDir], join(self.artifacts_dir, self.packname(proj)),
                  cwd=indexes_dir, checksum='md5')