New install - permission denied...

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
Pete1
Posts: 15
Joined: Wed Feb 22, 2017 8:59 pm

New install - permission denied...

Post by Pete1 » Wed Nov 27, 2019 9:39 pm

New install and I am getting "Unable to open input rtsp://a.b.c.d:554/11 due to: Permission denied".

I previously had Zoneminder working on a Centos 7 server, but after doing a routine (non-ZM) update (which I think included a kernel update), the server would no longer reboot properly (almost certainly unrelated to ZM), only to some recovery mode; I could not find a way to recover it. Coincidentally I also wanted to upgrade the hardware anyway (to add two more cameras) and had reached the performance limit.
So, new motherboard, faster processor and more memory, new install, I now get permission denied and no images.
I've tried to replicate the settings as closely as I had on my original install, but it seems that the hard disk on which I had ZM's daily settings backup also had failed on the original PC!

The new server is also Centos 7, and I have followed my notes as closely as possible to re-install (but inevitably it's a different Linux kernel and different ZM version as original so some differences along the way).
The fundamental issue seems to be: the zmc_m2 component reports an error in file zm_ffmpeg_camera.cpp:
Unable to open input rtsp://a.b.c.d:554/11 due to: Permission denied (a.b.c.d is the IP address of my camera).

I also have a laptop on the same network and with VLC, rtsp://a.b.c.d:554/11 displays the network stream as expected and I see my camera's output so there is clearly nothing wrong with the CCTV camera feed; I don't need to supply any user/password to VLC.

The only key difference I can think of between the original install and this one is that I am unable to get a GUI installation to work (my first install had either a KDE or Gnome GUI) so I've gone with a "minimal" command line only install for Centos (there seems to be some conflict between Centos and the new(second-hand) Gigabyte motherboard). It's just made it a bit harder for me as everything is over a command line rather than VNC or GUI direct, but I've learnt more and anyway a lot of Linux is just as easy on the command line. I am using my laptop to connect to the ZM server over http to view the ZM system and images (and since this is what I always previously did is fine by me - the server running Linux & ZM sat in the garage out of the way).

I did also have css and js WAR warnings (but they've dropped off the bottom of the log file right now). These are probably unrelated and require other resolution (but are not so important as getting the image to appear!).

I am 99% confident that my camera settings are identical to previously (I was able to refer back to a forum posting where I had a previous and different issue where I posted my settings). All I get on screen is the defined camera title at the top and play/stop/forward/backward etc. buttons at the bottom.

I'll be glad for any pointers to help resolve this. If there is any more information necessary to help then I can add in a subsequent post.

User avatar
snake
Posts: 334
Joined: Sat May 21, 2016 2:20 am

Re: New install - permission denied...

Post by snake » Wed Nov 27, 2019 10:26 pm

Post more logs. It sounds like ZM wasn't installed properly.

Which install guide did you follow?

Pete1
Posts: 15
Joined: Wed Feb 22, 2017 8:59 pm

Re: New install - permission denied...

Post by Pete1 » Fri Nov 29, 2019 10:07 pm

Is there a specific log file to post? The logs on screen are continuously updated - the entirety would be an awful lot of data!

I primarily follow what I did last time (I always make a note of what I've done just in case I need to re-do it, which in this case I did so it was useful). Last time that would have been based on information on these forums and the ZM wiki. The outline (after previously adding EPEL and RPM Fusion) is:

yum install zoneminder
Follow instructions in /usr/share/doc/zoneminder-common-1.32.3/README
/usr/share/doc/zoneminder-common-1.32.3/README.httpd
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --reload
https://wiki.zoneminder.com/Using_a_ded ... Hard_Drive
chcon -t httpd_sys_content_t events/ -R
chcon -t httpd_sys_content_t images/ -R
chcon -t httpd_sys_rw_content_t events/ -R
chcon -t httpd_sys_rw_content_t images/ -R

Configure two cameras, as I said previously based on the settings that I had published in trying to fix a fault.

User avatar
knight-of-ni
Posts: 2257
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: New install - permission denied...

Post by knight-of-ni » Fri Nov 29, 2019 10:59 pm

Looks like you left SELinux running. Disable it. Try again.

Verify you can see the RTSP stream using VLC Player, preferably on the server if it is not headless.
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/

Pete1
Posts: 15
Joined: Wed Feb 22, 2017 8:59 pm

Re: New install - permission denied...

Post by Pete1 » Sun Dec 08, 2019 10:34 pm

So, disabling SELinux I do get a bit further. But... I don't recall disabling it before. A bit of searching reveals that for years people have been getting ZM to work with SELinux. There seems to be different solutions (and some fairly old now). Has something changed since Dec 2017 (which is when I last setup ZM on Centos 7) which meant that ZM worked with SELinux but now doesn't? It was whatever version of Centos 7 was then and ZM was 1.30.4. I'd quite like to keep SELinux running, but can explore that later once I've got ZM working again.

By getting a bit further I mean that both cameras now report that they are capturing and one is creating events.

But I still don't see any images. Even on the captures. Capturing on one camera doesn't surprise me as I can see an annoying spiders web on one (can't solve that with software!) and it's moving in the IR light (it's dark right now). I'll expect to see more captures tomorrow from both when things move in the fields of view.

Whether it is from the console clicking on the name of the camera, looking at the zones window or looking at captured images they are all blank! And by blank I don't mean blue screen implying no video, just blank.

The server is command line only (for some reason I can't install a GUI version of Centos - I get errors) so I am verifying the CCTV image from another PC and logging in from that PC via the web interface. I am also SSH'd into the CCTV server and can ping the two cameras. Is it possible that not installing a GUI means other necessary files are not installed that are required to display images?

There are currently only INF log entries, no WAR or ERR.

From the image disk, there is a folder 2 in it and another folder 4 in that. I think that corresponds to event no. 4. I've opened some of the JPGs in that folder and can view those, confirming that the input side is working, but what is still not working is the ability to view the images on a remote web interface of ZM.

User avatar
snake
Posts: 334
Joined: Sat May 21, 2016 2:20 am

Re: New install - permission denied...

Post by snake » Mon Dec 09, 2019 4:49 am

Items that can cause ZM to be unable to show video stream in my experience are:

1) Browser is out of date.
2) Javascript not enabled
3) The paths in /etc/apache2/conf-enabled/zoneminder.conf have been edited or are otherwise not working due to permission issues. These permissions issues would be with Apache. If you have a default apache install, it's probably not an issue, but if you run other websites, and have custom apache configs, this may be a cause. (This is based on my experience with Debian/Ubuntu).

That apache path may differ with RHEL based dists. Check the apache logs for errors.

There is no requirement for a GUI (X,wayland). ZM works on headless servers.

It's possible to post logs in a phpbb code tag, which will keep them from filling up the whole post. If you can see either .jpg or .mp4 videos on the hdd in /var/cache/zoneminder, then you have it recording and are very close to a full install. Why it didn't work out of the box, I can't say. I primarily use Debian and Ubuntu which are generally considered 'easier' for new folk to install ZM on. Can't help much more than that.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests