> fileserver# /usr/local/etc/nut/bin/upsdrvctl start > Network UPS Tools - UPS driver controller 2.0.5 > Network UPS Tools - Megatec protocol driver 1.5 (2.0.5) > Carlos Rodrigues (c) 2003-2006 > > Can't uu_lock cuad1: creat error: Permission denied > Driver failed to start (exit status=1)Have you tried starting the driver without using "upsdrvctl"? Like this: "megatec -a QP1000 -DDD" -- Carlos Rodrigues
I'm forwarding this to the list, as I'm not quite sure what's going on here. Never seen this on Linux, don't know if it is a FreeBSD thing or not. ---------- Forwarded message ---------- From: Herman J van der Merwe <herman@mercygate.com> Date: Feb 11, 2007 9:50 PM Subject: NUT on FreeBSD To: carlos.efr@mail.telepac.pt Hello Carlos Maybe you can assist me with NUT 2.0.5 on FreeBSD 6.2-STABLE 1. I compiled from source and installed - no .conf files created in specified directory (in my case /usr/local/etc/nut) - no big problem - can do them manually 2. Created ups.conf with content [QP1000] driver = megatec port = /dev/cuad1 desc = "Fileserver" 3. Created upsd.conf with content: ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACCEPT localhost REJECT all 4. I did a chmod 777 on /dev/cuad1 to eliminate any permission pains at the beginning 5. I then started nut and got the following error: fileserver# /usr/local/etc/nut/bin/upsdrvctl start Network UPS Tools - UPS driver controller 2.0.5 Network UPS Tools - Megatec protocol driver 1.5 (2.0.5) Carlos Rodrigues (c) 2003-2006 Can't uu_lock cuad1: creat error: Permission denied Driver failed to start (exit status=1) 6. Since cuad1 has permission 777 this should not be possible ... If you cannot assist kindly forward the mail to somebody that can - this is fairly NB Thanks in advance and regards! Herman J van der Merwe SOUTH AFRICA -- Carlos Rodrigues
On 2/11/07, Carlos Rodrigues <carlos.efr@mail.telepac.pt> wrote:> I'm forwarding this to the list, as I'm not quite sure what's going on > here. Never seen this on Linux, don't know if it is a FreeBSD thing or > not.Apparently, uu_lock *is* a FreeBSD thing. What does 'man uu_lock' say about lock directories? I think the permission error is due to NUT trying to create a lock file in a lock directory that it doesn't have permission to write to. Also, did you specify a user to run as? The configure.in file implies that it defaults to user "uucp" if it finds uu_lock, so maybe the "uucp" user has write access to that directory.> ---------- Forwarded message ---------- > From: Herman J van der Merwe <herman@mercygate.com> > Date: Feb 11, 2007 9:50 PM > Subject: NUT on FreeBSD > To: carlos.efr@mail.telepac.pt > > > > > Hello Carlos > > Maybe you can assist me with NUT 2.0.5 on FreeBSD 6.2-STABLE > > 1. I compiled from source and installed - no .conf files created in > specified directory (in my case /usr/local/etc/nut) - no big problem - > can do them manually > 2. Created ups.conf with content > > [QP1000] > driver = megatec > port = /dev/cuad1 > desc = "Fileserver" > > 3. Created upsd.conf with content: > > ACL all 0.0.0.0/0 > ACL localhost 127.0.0.1/32 > > ACCEPT localhost > REJECT all > > 4. I did a chmod 777 on /dev/cuad1 to eliminate any permission pains > at the beginning > > 5. I then started nut and got the following error: > > > fileserver# /usr/local/etc/nut/bin/upsdrvctl start > Network UPS Tools - UPS driver controller 2.0.5 > Network UPS Tools - Megatec protocol driver 1.5 (2.0.5) > Carlos Rodrigues (c) 2003-2006 > > Can't uu_lock cuad1: creat error: Permission denied > Driver failed to start (exit status=1) > > 6. Since cuad1 has permission 777 this should not be possible ... > > If you cannot assist kindly forward the mail to somebody that can - > this is fairly NB > > Thanks in advance and regards! > > Herman J van der Merwe > SOUTH AFRICA > > > > > -- > Carlos Rodrigues > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser >-- - Charles Lepple
On Monday 12 February 2007 09:44, Carlos Rodrigues wrote:> Can't uu_lock cuad1: creat error: Permission denied > Driver failed to start (exit status=1) > > 6. Since cuad1 has permission 777 this should not be possible ...*lock* creation failed, not the attempt to open /dev/cuad1 The permissions of /var/spool/lock are what matter here, try creating a nut user and putting it in the dialer group, then tell NUT to run as that user (otherwise it setuid's to nobody) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20070212/018e62ee/attachment.pgp
On Monday 12 February 2007 16:58, Herman J van der Merwe wrote:> 3. What still remains a mystery to me is why no *.conf.sample files are > created in the /path/to/my/nutinstallation/etc directory.If you use the port you should get .sample versions of the configuration files will be installed. If you're not.. why not? It's by far the easiest way to install software in FreeBSD.> 4. The next step is to get my Apache server to serve NUT's cgi pages. I > ran into a few warnings and "no's" when I compiled with the "--with-cgi" > option. These are as below. Can you please comment if FreeBSD needs some > special attention to get the CGI stuff compiled in?<snip> It can't find gd. Either you don't have it installed or you didn't tell configure where to look for it. You can build the port with CGI support by doing.. cd /usr/ports/sysutils/nut make WITH_NUT_CGI= install If you feel you can't use ports then make sure gd is installed and run NUT's configure like so.. env CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure .. and it should find it. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20070212/b9cf486f/attachment.pgp