Question

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

Was it helpful?

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. :)

OTHER TIPS

Try doing the following.

$ touch yaws.conf

$ yaws

Hit the enter key to bring up the prompt. Works on Debian 7 (wheezy).

You may also want to do the following to place your username in the yaws group.

$ adduser USERNAME yaws

To one of the maintainers of this package found in the readme file, I have pointed them to here.

$ dpkg -L yaws | grep -i readme

My system is Debian 7 or often called wheezy distro. It's actually kali-linux but that's just fyi stuff. I browsed to /etc/yaws as root with nautilus otherwise it's locked.

~$ sudo su
[sudo] password for username:
# nautilus
Initializing nautilus-gdu extension

Now you may look in the /etc/yaws directory. The yaws.conf should be in there. Josef would be correct as this is what yaws will try to use if the user has access to this file. But not being root you don't.

My solution is to just get ideas out of that file and the others within the same directory. Take this next answer from Van and make your home/user have a yaws.conf and play around with different configurations from what you found in the etc one. Not that hard to copy and paste if you just have access to the files. Enjoy! :-D

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top