Implements file permissions

ADD: external file permission handling