/tmp/zm problems

Forum for questions and support relating to the 1.30.x releases only.
Locked
duke1swd
Posts: 8
Joined: Tue Oct 10, 2017 2:04 am

/tmp/zm problems

Post 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!
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: /tmp/zm problems

Post 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.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: /tmp/zm problems

Post by bbunge »

I have updated the Debian 9 WIKI instructions with this step:

https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way
duke1swd
Posts: 8
Joined: Tue Oct 10, 2017 2:04 am

Re: /tmp/zm problems

Post 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!
infinity005
Posts: 11
Joined: Tue Nov 16, 2004 5:37 am

Re: /tmp/zm problems

Post 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.
Locked