Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm starting to use puppet. i wanted to have my own yum repository to serve puppet server so i issued

 yum install createrepo

no errors reported (cenotos 5.5) after that i issued

createrepo /var/www/html/repository

but i get:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Traceback (most recent call last):
  File "/usr/share/createrepo/", line 724, in ?
  File "/usr/share/createrepo/", line 592, in main
    cmds, directories = parseArgs(args)
  File "/usr/share/createrepo/", line 431, in parseArgs
    cmds['basedir'] = os.getcwd()
 OSError: [Errno 2] No such file or directory

note the folder:



share|improve this question
up vote 1 down vote accepted

i found the problem os.getcwd() throws exception because as it turned the directory i was in was deleted by another process. all i needed to do was to change to a valid directory. interesting watson.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.