Only change permissions if Filedata exists