Permission fix for view_attachment