V
V
Vladislav2019-04-26 12:03:22
NAS
Vladislav, 2019-04-26 12:03:22

samba. How to deal with a problem device (hikvision network camera)?

Problem:
Camera from hikvision, when connected to a network drive, swears at access rights. This creates the folder /mnt/smbdrive/webcam/webcam/hiwatch1/test with permissions 644 from videouser:videouser
Required:
Only the camera can record and delete, users from the group can watch recordings.
Given: HiWatch DS-I114W (hikvision) camera with declared smb support, computer with x64 version of Ubuntu (16.04.5 LTS (Xenial Xerus) and part-time network drive (Samba version 4.3.11-Ubuntu), another network camera from d-link with smb support (works flawlessly)
Users:

  • user1, a member of the videouser group,
  • videouser belonging to the videouser group

Samba settings:
[webcam$]
comment = d-link
path = /mnt/smbdrive/webcam/webcam
guest ok = no
browseable = no
writable = yes
create mask = 0640
directory mask = 0750
inherit permissions = yes
force user = videouser
force group = videouser
valid users = @videouser
write list = videouser
read list = @videouser

[hiwatch1$]
comment = hikvision
path = /mnt/smbdrive/webcam/webcam/hiwatch1
guest ok = no
browseable = no
writable = yes
create mask = 0640
directory mask = 0750
inherit permissions = yes
force user = videouser
force group = videouser
valid users = @videouser
write list = videouser
read list = @videouser

I tried to change it in the samba settings in the [hiwatch1$] section, it did not bring the result:
force create mask = 0100
create mask = 0755

Tech Support Response:
"We have tested and guaranteed to work only with hardware solutions from QNAP and Synology."
I do not understand how the camera can give new folders permissions 0644 and I believe that this is the problem.
smb status output:
Samba version 4.3.11-Ubuntu
PID     Username      Group         Machine            Protocol Version       
------------------------------------------------------------------------------
7248 videouser videouser 192.168.#.# (ipv4:192.168.#.#:55168) NT1

Service      pid     machine       Connected at
-------------------------------------------------------
hiwatch1$    7248   192.168.#.#  Wed Apr 24 19:42:34 2019

Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saiputdin Omarov, 2019-05-04
@generalx

ZoneMinder Stream distribute to users as you wish. the stream will look like rtsp://admin:[email protected]:554/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question