Fixing permissions with upgrade script.