Fixing attachments permissions