Use $_SETATTR instead of chattr to remove the barrier.