corrected #8 to set proper access rights for files and dirs