properly check if we can write to the cgroup