Search code examples
erlanginstallationyaws

Erlang install: "Can't find config file " error message


I'm trying to install Yaws on my Ubuntu 11.01 system via apt-get install yaws. But when I call the shell script yaws from the command line I get the following error: Yaws: Bad conf: "Can't find config file "

Unless my aging eyes are missing something, I can't find enlightenment in either the Yaws website or Zachery Kessin's book.

I can find configuration files in /etc/yaws. But is there something else I need to know/do?

Thanks,

LRP


Solution

  • If you installed yaws with the package manager then it's controlled by an init script (and you should work with that instead of running yaws manually, I'll add).

    You're most likely running yaws as a non-privileged user, and if you look closely, the directory /etc/yaws is:

    drwxr-x---  4 root yaws    4096 Aug  7 10:36 yaws
    

    You're probably trying to run yaws under a user other than root, and without membership in the yaws group.

    I would venture a guess that this is a bug in the distro's packaging rather than in yaws since the man page clearly states that running it as a non-privileged user it falls back to reading /etc/yaws/yaws.conf, except that under Debian/Ubuntu (I'm on Debian 6) the permissions on /etc/yaws/ do not live up to the claim in the map page.

    But, if you work through the distro's init script and daemon management facilities your problem goes away magically. That I think is preferable to tapping the Debian packager on the shoulder and having a long conversation about config directory permissions. :)