@kirkgbr Once the image is built [compiled], and the image flashed, files that are 600 or 400 within <buildroot>/files end up with 664 or 644 permissions once flashed to the router.
I only started noticing this in the past couple of months (I wanna say July-ish was around when I began noticing it), and wrote a firstboot script to resolve the permissions issue, but I was curious if anyone else has experienced this. I've recreated the build environment twice since then, with the issue re-occurring each time. I'll create a thread specifically for this then if no one else has seen anything similar.
After double checking, shadow is showing as 600, but keys and p12s within /etc/ssl which have 600 permissions in the build environment are created with 644 permissions within the image. These are my main concern, as I can always leave shadow out and simply set the root password at first boot, however it's critical keys and p12's are root accessible only.
build environment
[jw0914@uvm] ~/openwrt/dev/files/etc $ ls -lsaR ssl
ssl:
total 52
4 drwxrwxr-x 6 jw0914 jw0914 4096 Oct 9 14:38 .
4 drwxrwxr-x 8 jw0914 jw0914 4096 Oct 9 18:21 ..
4 drwxrwxr-x 2 jw0914 jw0914 4096 Sep 19 09:41 ca
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:40 certs
28 -rw-r----- 1 jw0914 jw0914 25465 Sep 17 10:16 openssl.cnf
4 drwxrwxr-x 3 jw0914 jw0914 4096 Oct 9 14:13 openvpn
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:13 uhttpd
ssl/ca:
total 20
4 drwxrwxr-x 2 jw0914 jw0914 4096 Sep 19 09:41 .
4 drwxrwxr-x 6 jw0914 jw0914 4096 Oct 9 14:38 ..
8 -rw-r--r-- 1 jw0914 jw0914 4558 Sep 13 13:08 WRT1200AC-ICA-Chain.crt.pem
4 -rw-r--r-- 1 jw0914 jw0914 2273 Sep 13 11:37 WRT1200AC-ICA.crt.pem
ssl/certs:
total 16
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:40 .
4 drwxrwxr-x 6 jw0914 jw0914 4096 Oct 9 14:38 ..
4 -rw-r--r-- 1 jw0914 jw0914 1988 Sep 13 12:25 wrt1200ac-uhttpd.crt
4 -rw-r--r-- 1 jw0914 jw0914 1960 Sep 13 12:27 wrt1200ac-VPNserver.crt
ssl/openvpn:
total 12
4 drwxrwxr-x 3 jw0914 jw0914 4096 Oct 9 14:13 .
4 drwxrwxr-x 6 jw0914 jw0914 4096 Oct 9 14:38 ..
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:15 VPNserver
ssl/openvpn/VPNserver:
total 28
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:15 .
4 drwxrwxr-x 3 jw0914 jw0914 4096 Oct 9 14:13 ..
4 -rw------- 1 jw0914 jw0914 769 Sep 19 09:07 dh4096.pem
4 -rw------- 1 jw0914 jw0914 657 Sep 19 12:07 ta.key
4 -rw-r--r-- 1 jw0914 jw0914 1960 Sep 13 12:27 wrt1200ac-VPNserver.crt
8 -rw------- 1 jw0914 jw0914 6381 Sep 17 16:55 wrt1200ac-VPNserver.p12
ssl/uhttpd:
total 16
4 drwxrwxr-x 2 jw0914 jw0914 4096 Oct 9 14:13 .
4 drwxrwxr-x 6 jw0914 jw0914 4096 Oct 9 14:38 ..
4 -rw-r--r-- 1 jw0914 jw0914 1988 Sep 13 12:25 wrt1200ac-uhttpd.crt
4 -rw------- 1 jw0914 jw0914 1704 Sep 17 16:47 wrt1200ac-uhttpd.key
(Last edited by JW0914 on 10 Oct 2016, 03:08)