Page 1 of 1

/tmp/zm problems

Posted: Tue Oct 10, 2017 11:46 am
by duke1swd
Zoneminder newbie here. Clean install of Debian 9.2 on an old PC. Clean install of ZM 1.30.4. Dual-core with 2 GB of RAM. 2 cameras, a low-res USB and a Foscam C2. Load is < .5, shm is about 44%.

In general things are mostly working. I can look at a live feed, motion detect works, I can look events.

But, there are lots of errors in my log, most related to the Foscam. Before trying to figure those out, I thought I'd start with something simple:

Code: Select all

zms ERR Can't stat '/tmp/zm': No such file or directory zm_monitor.cpp
zms ERR Unable to validate swap image path, disabling buffered playback	zm_monitor.cpp
I tried to export the log so I could paste it here. That doesn't work either:

Code: Select all

web_php FAT Unable to open log export file /tmp/zm/zm-log-58141472.txt /usr/share/zoneminder/www/ajax/log.php
I assume that is the same problem.

I've checked, /tmp/zm is owned by www-data:www-data, mode 755. All of the ZM process are running with uid mapping to www-data.
/tmp/zm is empty.
/tmp/zm is part of my root file system, which has about 300 GB free.

Suggestions?

Thanks much!

Re: /tmp/zm problems

Posted: Tue Oct 10, 2017 12:11 pm
by knight-of-ni
Debian uses private tmp folders so even though you can see the files & folders, zoneminder cannot because it is running under a different user account.

Go to Options -> Paths and then inspect each PATH_XXX variable. If it is set to "/tmp/zm", change it to "/dev/shm". Don't forget to restart zoneminder.

This is technically a packaging issue which should be reported to Debian bugs.

Re: /tmp/zm problems

Posted: Tue Oct 10, 2017 1:12 pm
by bbunge
I have updated the Debian 9 WIKI instructions with this step:

https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way

Re: /tmp/zm problems

Posted: Wed Oct 11, 2017 11:39 am
by duke1swd
I changed the value of PATH_SWAP from /tmp/zm to /dev/shm. This was the only path referencing /tmp.
This appears to have solved the problem.

Thanks!

Re: /tmp/zm problems

Posted: Sat Nov 11, 2017 4:29 am
by infinity005
If you want to leave PATH_SWAP as /tmp/zm ...

Another solution is to edit
/etc/systemd/system/multi-user.target.wants/apache2.service

and change
PrivateTmp=false

then restart systemd and related services or restart the computer.