>Synopsis: smartmontools package /etc/smartd_warning.sh has incorrect file >permissions >Category: user >Environment: System : OpenBSD 7.6 Details : OpenBSD 7.6 (GENERIC.MP) #338: Mon Sep 30 08:55:35 MDT 2024 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64 Machine : amd64 >Description: I'm trying to send emails for disk errors using the smartmontools package. For this to work, the script /etc/smartd_warning.sh has to be executable. However, the port has mode 644 on this file. syslog Oct 17 11:07:05 shadowgate smartd[6657]: smartd 7.4 2023-08-01 r5530 [OpenBSD 7.6 amd64] (local build) Oct 17 11:07:05 shadowgate smartd[6657]: Opened configuration file /etc/smartd.conf Oct 17 11:07:05 shadowgate smartd[6657]: Drive: DEVICESCAN, implied '-a' Directive on line 1 of file /etc/smartd.conf Oct 17 11:07:05 shadowgate smartd[6657]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c, type changed from 'scsi' to 'sat' Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c [SAT], opened Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c [SAT], SPCC Solid State Disk, S/N:AA000000000000011984, FW:R0831B0, 512 GB Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c [SAT], not found in smartd database 7.3/5528. Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c [SAT], not capable of SMART Health Status check Oct 17 11:07:05 shadowgate smartd[6657]: Device: /dev/sd0c [SAT], is SMART capable. Adding to "monitor" list. Oct 17 11:07:05 shadowgate smartd[6657]: Monitoring 1 ATA/SATA, 0 SCSI/SAS and 0 NVMe devices Oct 17 11:07:05 shadowgate smartd[6657]: Executing test of <mail> to m...@techautonomy.net ... Oct 17 11:07:05 shadowgate smartd[6657]: Test of <mail> to m...@techautonomy.net produced unexpected output (63 bytes) to STDOUT/STDERR: Oct 17 11:07:05 shadowgate smartd[6657]: sh: /etc/smartd_warning.sh: cannot execute - Permission denied Oct 17 11:07:05 shadowgate smartd[6657]: Test of <mail> to m...@techautonomy.net: failed (32-bit/8-bit exit status: 32256/126) >How-To-Repeat: Put this in /etc/smartd.conf and run 'rcctl restart smartd': DEVICESCAN -m m...@techautonomy.net -M test Per the documentation this is supposed to send a test email to you. On OpenBSD it doesn't work due to a the file permissions on smartd_warning.sh >Fix: chmod 755 /etc/smartd_warning.sh dmesg: OpenBSD 7.6 (GENERIC.MP) #338: Mon Sep 30 08:55:35 MDT 2024 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 8451977216 (8060MB) avail mem = 8172580864 (7793MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 3.0 @ 0xee3d0 (86 entries) bios0: vendor American Megatrends Inc. version "1.08" date 03/12/2018 bios0: Shuttle Inc. DS77U acpi0 at bios0: ACPI 6.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC FPDT MCFG FIDT SLIC SSDT HPET SSDT SSDT UEFI SSDT SSDT SSDT LPIT WSMT SSDT SSDT DBGP DBG2 ASF! acpi0: wakeup devices RP09(S4) PXSX(S4) RP10(S4) PXSX(S4) RP11(S4) PXSX(S4) RP12(S4) PXSX(S4) RP13(S4) PXSX(S4) RP01(S4) PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) [...] acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Celeron(R) CPU 3865U @ 1.80GHz, 1696.05 MHz, 06-8e-09, patch 000000f6 cpu0: cpuid 1 edx=bfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> ecx=47faebbf<SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND> cpu0: cpuid 6 eax=27f5<SENSOR,ARAT> ecx=9<EFFFREQ> cpu0: cpuid 7.0 ebx=2946687<FSGSBASE,TSC_ADJUST,SGX,SMEP,ERMS,INVPCID,MPX,RDSEED,SMAP,CLFLUSHOPT,PT> edx=bc002e00<SRBDS_CTRL,MD_CLEAR,TSXFA,IBRS,IBPB,STIBP,L1DF,SSBD> cpu0: cpuid a vers=4, gp=8, gpwidth=48, ff=3, ffwidth=48 cpu0: cpuid d.1 eax=f<XSAVEOPT,XSAVEC,XGETBV1,XSAVES> cpu0: cpuid 80000001 edx=2c100800<NXE,PAGE1GB,RDTSCP,LONG> ecx=121<LAHF,ABM,3DNOWP> cpu0: cpuid 80000007 edx=100<ITSC> cpu0: msr 10a=a000c04<RSBA,MISC_PKG_CT,ENERGY_FILT,GDS_CTRL,RFDS_NO> cpu0: MELTDOWN cpu0: 32KB 64b/line 8-way D-cache, 32KB 64b/line 8-way I-cache, 256KB 64b/line 4-way L2 cache, 2MB 64b/line 8-way L3 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 24MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu1 at mainbus0: apid 2 (application processor) cpu1: Intel(R) Celeron(R) CPU 3865U @ 1.80GHz, 1696.06 MHz, 06-8e-09, patch 000000f6 cpu1: smt 0, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 120 pins acpimcfg0 at acpi0 acpimcfg0: addr 0xe0000000, bus 0-255 acpihpet0 at acpi0: 23999999 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG0) acpiprt2 at acpi0: bus -1 (PEG1) acpiprt3 at acpi0: bus -1 (PEG2) acpiprt4 at acpi0: bus -1 (RP09) acpiprt5 at acpi0: bus -1 (RP10) acpiprt6 at acpi0: bus -1 (RP11) acpiprt7 at acpi0: bus -1 (RP12) acpiprt8 at acpi0: bus -1 (RP13) acpiprt9 at acpi0: bus -1 (RP01) acpiprt10 at acpi0: bus -1 (RP02) acpiprt11 at acpi0: bus 1 (RP03) acpiprt12 at acpi0: bus -1 (RP04) acpiprt13 at acpi0: bus 2 (RP05) acpiprt14 at acpi0: bus -1 (RP06) acpiprt15 at acpi0: bus -1 (RP07) acpiprt16 at acpi0: bus -1 (RP08) acpiprt17 at acpi0: bus -1 (RP17) acpiprt18 at acpi0: bus -1 (RP18) acpiprt19 at acpi0: bus -1 (RP19) acpiprt20 at acpi0: bus -1 (RP20) acpiprt21 at acpi0: bus -1 (RP14) acpiprt22 at acpi0: bus -1 (RP15) acpiprt23 at acpi0: bus -1 (RP16) acpiec0 at acpi0: not present acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001 com0 at acpi0 UAR1 addr 0x3f8/0x8 irq 4: ns16550a, 16 byte fifo com1 at acpi0 UAR2 addr 0x2f8/0x8 irq 3: ns16550a, 16 byte fifo acpicmos0 at acpi0 acpibtn0 at acpi0: SLPB intelpmc0 at acpi0: PEPD state 0: 0x7f:1:2:0x00:0x0000000000000060 counter: 0x7f:64:0:0x00:0x0000000000000632 frequency: 0 state 1: 0x7f:1:2:0x00:0x0000000000000060 counter: 0x00:32:0:0x03:0x00000000fe00013c frequency: 10000 acpibtn1 at acpi0: PWRB "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured "PNP0C0B" at acpi0 not configured acpicpu0 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpicpu1 at acpi0: C3(200@1034 mwait.1@0x60), C2(200@151 mwait.1@0x33), C1(1000@1 mwait.1), PSS acpipwrres0 at acpi0: WRST acpipwrres1 at acpi0: WRST acpipwrres2 at acpi0: WRST acpipwrres3 at acpi0: WRST acpipwrres4 at acpi0: WRST acpipwrres5 at acpi0: WRST acpipwrres6 at acpi0: WRST acpipwrres7 at acpi0: WRST acpipwrres8 at acpi0: WRST acpipwrres9 at acpi0: WRST acpipwrres10 at acpi0: WRST acpipwrres11 at acpi0: WRST acpipwrres12 at acpi0: WRST acpipwrres13 at acpi0: WRST acpipwrres14 at acpi0: WRST acpipwrres15 at acpi0: WRST acpipwrres16 at acpi0: WRST acpipwrres17 at acpi0: WRST acpipwrres18 at acpi0: WRST acpipwrres19 at acpi0: WRST acpipwrres20 at acpi0: FN00, resource for FAN0 acpipwrres21 at acpi0: FN01, resource for FAN1 acpipwrres22 at acpi0: FN02, resource for FAN2 acpipwrres23 at acpi0: FN03, resource for FAN3 acpipwrres24 at acpi0: FN04, resource for FAN4 acpitz0 at acpi0: critical temperature is 119 degC acpitz1 at acpi0: critical temperature is 119 degC acpivideo0 at acpi0: GFX0 cpu0: using VERW MDS workaround (except on vmm entry) cpu0: Enhanced SpeedStep 1696 MHz: speeds: 1801, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "Intel Core 7G Host" rev 0x02 inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 610" rev 0x02 drm0 at inteldrm0 inteldrm0: msi, KABYLAKE, gen 9 xhci0 at pci0 dev 20 function 0 "Intel 100 Series xHCI" rev 0x21: msi, xHCI 1.0 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1 "Intel 100 Series MEI" rev 0x21 at pci0 dev 22 function 0 not configured ahci0 at pci0 dev 23 function 0 "Intel 100 Series AHCI" rev 0x21: msi, AHCI 1.3.1 ahci0: port 0: 6.0Gb/s ahci0: PHY offline on port 1 scsibus1 at ahci0: 32 targets sd0 at scsibus1 targ 0 lun 0: <ATA, SPCC Solid State, R083> t10.ATA_SPCC_Solid_State_Disk_AA000000000000011984 sd0: 488386MB, 512 bytes/sector, 1000215216 sectors, thin ppb0 at pci0 dev 28 function 0 "Intel 100 Series PCIE" rev 0xf1: msi pci1 at ppb0 bus 1 em0 at pci1 dev 0 function 0 "Intel I211" rev 0x03: msi, address 80:ee:73:de:16:3e ppb1 at pci0 dev 28 function 4 "Intel 100 Series PCIE" rev 0xf1: msi pci2 at ppb1 bus 2 rtwn0 at pci2 dev 0 function 0 "Realtek 8188EE" rev 0x01: msi rtwn0: MAC/BB RTL8188EE, RF 6052 1T1R, address 80:c5:f2:b2:f7:c0 pcib0 at pci0 dev 31 function 0 "Intel 200 Series LPC" rev 0x21 "Intel 100 Series PMC" rev 0x21 at pci0 dev 31 function 2 not configured azalia0 at pci0 dev 31 function 3 "Intel 200 Series HD Audio" rev 0x21: msi azalia0: codecs: Realtek ALC662, Intel/0x280b, using Realtek ALC662 audio0 at azalia0 ichiic0 at pci0 dev 31 function 4 "Intel 100 Series SMBus" rev 0x21: apic 2 int 16 iic0 at ichiic0 spdmem0 at iic0 addr 0x50: 4GB DDR4 SDRAM PC4-19200 SO-DIMM spdmem1 at iic0 addr 0x52: 4GB DDR4 SDRAM PC4-19200 SO-DIMM em1 at pci0 dev 31 function 6 "Intel I219-LM" rev 0x21: msi, address 80:ee:73:de:16:3d isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pcppi0 at isa0 port 0x61 spkr0 at pcppi0 it0 at isa0 port 0x2e/2: IT8728F rev 1, EC port 0xa40 vmm0 at mainbus0: VMX/EPT ugen0 at uhub0 port 5 "Generic USB2.0-CRW" rev 2.00/39.60 addr 2 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root scsibus3 at softraid0: 256 targets root on sd0a (626ca4c8bb83838c.a) swap on sd0b dump on sd0b inteldrm0: 1920x1200, 32bpp wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) usbdevs: Controller /dev/usb0: addr 01: 8086:0000 Intel, xHCI root hub super speed, self powered, config 1, rev 1.00 driver: uhub0 addr 02: 0bda:0129 Generic, USB2.0-CRW high speed, power 500 mA, config 1, rev 39.60, iSerial 20100201396000000 driver: ugen0