OH3: openhab-logs missing in /srv after migration

@CubaMAN

Can you do a

ls -al

in / srv and post the output? Perhaps it’s a problem with permissions. It should look like this:

openhabian@openhab3:/srv $ ls -al
insgesamt 36
drwxr-xr-x   7 openhab openhab 4096 Dez 28 10:36 .
drwxr-xr-x  23 root    root    4096 Jan 28 17:58 ..
drwxrwxrwx   2 openhab openhab 4096 Jan 28 17:58 openhab-addons
drwxrwxrwx+ 14 openhab openhab 4096 Feb 19 19:34 openhab-conf
drwxrwxrwx   2 openhab openhab 4096 Feb 20 13:19 openhab-logs
drwxrwxrwx   4 openhab openhab 4096 Jan 28 17:58 openhab-sys
drwxrwxrwx+ 18 openhab openhab 4096 Feb 17 17:24 openhab-userdata

The owner should be “openhab” for all directories.

Thanks for your help. I changed the group ownership to openhab an all permissions to the same level.
Now it looks like this:

[20:54:34] openhabian@openHABianPi:/srv$ ls -al
total 52
drwxrwxr-x   2 openhab    openhab    4096 Feb 20 22:20 openhab-addons
drwxrwxr-x  14 openhab    openhab    4096 Feb 12 17:52 openhab-conf
drwxrwxr-x   2 openhab    openhab    4096 Feb 21 17:01 openhab-logs
drwxrwxr-x   4 openhab    openhab    4096 Feb 20 22:19 openhab-sys
drwxrwxr-x  14 openhab    openhab    4096 Feb 20 22:24 openhab-userdata

Unfortunately “openhab-logs” is still missing.

What is the content of your /etc/samba/smb.conf file ?

Do you mean the custom share definitions or something before this section?
Do I just have to remove the semicolons at openHAB-logs?

#=================== Custom Share Definitions ====================

;[openHAB-share]
;  comment=openHAB combined folders
;  path=/srv
;  writeable=yes
;  public=no
;  create mask=0664
;  directory mask=0775
;  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
;  delete veto files = yes

[openHAB-addons]
  comment=openHAB addons
  path=/usr/share/openhab/addons
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

[openHAB-conf]
 comment=openHAB site configuration
  path=/etc/openhab
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

[openHAB-userdata]
comment=openHAB userdata
  path=/var/lib/openhab
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

[openHAB-sys]
comment=openHAB application
  path=/usr/share/openhab
  writeable=yes
  public=no
  create mask=0664
  directory mask=0775
  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
  delete veto files = yes

;[openHAB-logs]
comment=openHAB log files
;  path=/var/log/openhab
;  writeable=yes
;  public=no
;  create mask=0664
;  directory mask=0775
;  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
;  delete veto files = yes

# vim: filetype=samba

remove the ; in the openHAB-logs block. So that it looks similar to the others.
Then restart the samba service.

Perfect. Now it works. :+1: Thanks for your help.

1 Like

Worked for me, too. Thanks !

In the commented log section in /etc/samba/smb.conf there is a warning. What kind of loss and when does it occur, anyone knows?

; ATTENTION: /var/log is on zram
; Sharing this will cause data loss of logs
; You *can* uncomment this but you have been warned
;[openHAB-logs]
;  comment=openHAB log files
;  path=/var/log/openhab
;  writeable=yes
;  public=no
;  create mask=0664
;  directory mask=0775
;  veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/._*/
;  delete veto files = yes

It is mentioned in Mount logs under /srv/ by spacemanspiff2007 · Pull Request #1579 · openhab/openhabian · GitHub