Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a rather unique situation here that about 2 hours of googling couldn't help me with.

I'm building a project using Cmake that will eventually generate rpms for target architectures using mock. Currently I'm working on getting the chroot environment set up to work properly. I'm running this all on a CentOS 5 install. I've got the mock.cfg file set up and after some trouble shooting for a previous problem, running:

mock --init -r [my-mock-config]

Gives me:

DEBUG: Executing command: ['perl', '-p', '-i', '-e', 's/^(mockbuild:)!!/$1/;', '/etc/passwd']
DEBUG: Child returncode was: 13

The logs are no more helpful than simply restating the error.

Setting aside the fact that I think a perl script editing /etc/passwd is a little weird (if that is indeed what it's doing), is the broken pipe return code referring to a permissions issue? Per Fedora's (and others') recommendations I'm running mock/building these as a non-root user.

I'm by no means an expert at any of this, but I'm really hesitant to start changing permissions on /etc/passwd. Anyone else run into this before? Hopefully this is the right place to ask this.

share|improve this question
Also, let me know if I need to dump my cfg file somewhere for scrutiny. – donovan.lampa May 1 '12 at 18:08
In doing a little more looking into this, the user of the chroot that gets created doesn't seem to have access to /dev/null mock-chroot> echo foo > /dev/null bash: /dev/null: Permission denied However, the user that I've added to the mock group does have access to /dev/null (i.e. the same command doesn't return an error). I'm very confused... – donovan.lampa May 2 '12 at 14:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.