Advertisement
RobertBerger

Untitled

Sep 26th, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.82 KB | None | 0 0
  1. default with systemd:
  2.  
  3. bitbake secure-core-image-minimal -e | grep USE_DEVFS
  4. USE_DEVFS="1"
  5.  
  6. By default, YP is configured with USE_DEVFS= “1”, and the owner of devices if “root” with 0600 permissions.
  7.  
  8. ... but there are also groups which allow access of non root to various devices - a typical example is the dialout group
  9.  
  10. ... also not all of them are with 0600 permissions
  11.  
  12. drwxr-xr-x 16 root root 3.3K Sep 26 17:41 .
  13. drwxr-xr-x 17 root root 1.0K Sep 26 17:36 ..
  14. crw-r--r-- 1 root root 10, 235 Sep 26 17:41 autofs
  15. drwxr-xr-x 2 root root 560 Sep 26 17:41 block
  16. drwxr-xr-x 2 root root 60 Sep 26 17:41 bsg
  17. crw-rw---- 1 root disk 10, 234 Sep 26 17:41 btrfs-control
  18. drwxr-xr-x 3 root root 60 Sep 26 17:41 bus
  19. lrwxrwxrwx 1 root root 3 Sep 26 17:41 cdrom -> sr0
  20. drwxr-xr-x 2 root root 2.7K Sep 26 17:41 char
  21. crw------- 1 root root 5, 1 Sep 26 17:41 console
  22. drwxr-xr-x 6 root root 120 Sep 26 17:41 cpu
  23. crw------- 1 root root 10, 125 Sep 26 17:41 cpu_dma_latency
  24. crw------- 1 root root 10, 203 Sep 26 17:41 cuse
  25. drwxr-xr-x 6 root root 120 Sep 26 17:41 disk
  26. drwxr-xr-x 3 root root 80 Sep 26 17:41 dri
  27. crw-rw---- 1 root video 29, 0 Sep 26 17:41 fb0
  28. lrwxrwxrwx 1 root root 13 Sep 26 17:41 fd -> /proc/self/fd
  29. crw-rw-rw- 1 root root 1, 7 Sep 26 17:41 full
  30. crw-rw-rw- 1 root root 10, 229 Sep 26 17:41 fuse
  31. crw------- 1 root root 10, 228 Sep 26 17:41 hpet
  32. crw------- 1 root root 10, 183 Sep 26 17:41 hwrng
  33. lrwxrwxrwx 1 root root 12 Sep 26 17:41 initctl -> /run/initctl
  34. drwxr-xr-x 4 root root 180 Sep 26 17:41 input
  35. crw-r--r-- 1 root root 1, 11 Sep 26 17:41 kmsg
  36. lrwxrwxrwx 1 root root 28 Sep 26 17:41 log -> /run/systemd/journal/dev-log
  37. crw-rw---- 1 root disk 10, 237 Sep 26 17:41 loop-control
  38. brw-rw---- 1 root disk 7, 0 Sep 26 17:41 loop0
  39. brw-rw---- 1 root disk 7, 1 Sep 26 17:41 loop1
  40. brw-rw---- 1 root disk 7, 2 Sep 26 17:41 loop2
  41. brw-rw---- 1 root disk 7, 3 Sep 26 17:41 loop3
  42. brw-rw---- 1 root disk 7, 4 Sep 26 17:41 loop4
  43. brw-rw---- 1 root disk 7, 5 Sep 26 17:41 loop5
  44. brw-rw---- 1 root disk 7, 6 Sep 26 17:41 loop6
  45. brw-rw---- 1 root disk 7, 7 Sep 26 17:41 loop7
  46. drwxr-xr-x 2 root root 60 Sep 26 17:41 mapper
  47. drwxrwxrwt 2 root root 40 Sep 26 17:41 mqueue
  48. drwxr-xr-x 2 root root 60 Sep 26 17:41 net
  49. crw-rw-rw- 1 root root 1, 3 Sep 26 17:41 null
  50. crw-r----- 1 root kmem 1, 4 Sep 26 17:41 port
  51. crw------- 1 root root 108, 0 Sep 26 17:41 ppp
  52. crw-rw-rw- 1 root tty 5, 2 Sep 26 17:41 ptmx
  53. drwxr-xr-x 2 root root 0 Sep 26 17:41 pts
  54. brw-rw---- 1 root disk 1, 0 Sep 26 17:41 ram0
  55. brw-rw---- 1 root disk 1, 1 Sep 26 17:41 ram1
  56. brw-rw---- 1 root disk 1, 10 Sep 26 17:41 ram10
  57. brw-rw---- 1 root disk 1, 11 Sep 26 17:41 ram11
  58. brw-rw---- 1 root disk 1, 12 Sep 26 17:41 ram12
  59. brw-rw---- 1 root disk 1, 13 Sep 26 17:41 ram13
  60. brw-rw---- 1 root disk 1, 14 Sep 26 17:41 ram14
  61. brw-rw---- 1 root disk 1, 15 Sep 26 17:41 ram15
  62. brw-rw---- 1 root disk 1, 2 Sep 26 17:41 ram2
  63. brw-rw---- 1 root disk 1, 3 Sep 26 17:41 ram3
  64. brw-rw---- 1 root disk 1, 4 Sep 26 17:41 ram4
  65. brw-rw---- 1 root disk 1, 5 Sep 26 17:41 ram5
  66. brw-rw---- 1 root disk 1, 6 Sep 26 17:41 ram6
  67. brw-rw---- 1 root disk 1, 7 Sep 26 17:41 ram7
  68. brw-rw---- 1 root disk 1, 8 Sep 26 17:41 ram8
  69. brw-rw---- 1 root disk 1, 9 Sep 26 17:41 ram9
  70. crw-rw-rw- 1 root root 1, 8 Sep 26 17:41 random
  71. crw-rw-r-- 1 root root 10, 242 Sep 26 17:41 rfkill
  72. lrwxrwxrwx 1 root root 4 Sep 26 17:41 rtc -> rtc0
  73. crw------- 1 root root 254, 0 Sep 26 17:41 rtc0
  74. drwxrwxrwt 2 root root 40 Sep 26 17:41 shm
  75. drwxr-xr-x 2 root root 80 Sep 26 17:41 snd
  76. brw-rw---- 1 root cdrom 11, 0 Sep 26 17:41 sr0
  77. lrwxrwxrwx 1 root root 15 Sep 26 17:41 stderr -> /proc/self/fd/2
  78. lrwxrwxrwx 1 root root 15 Sep 26 17:41 stdin -> /proc/self/fd/0
  79. lrwxrwxrwx 1 root root 15 Sep 26 17:41 stdout -> /proc/self/fd/1
  80. crw-rw-rw- 1 root tty 5, 0 Sep 26 17:43 tty
  81. crw--w---- 1 root tty 4, 0 Sep 26 17:41 tty0
  82. crw--w---- 1 root tty 4, 1 Sep 26 17:41 tty1
  83. crw--w---- 1 root tty 4, 10 Sep 26 17:41 tty10
  84. crw--w---- 1 root tty 4, 11 Sep 26 17:41 tty11
  85. crw--w---- 1 root tty 4, 12 Sep 26 17:41 tty12
  86. crw--w---- 1 root tty 4, 13 Sep 26 17:41 tty13
  87. crw--w---- 1 root tty 4, 14 Sep 26 17:41 tty14
  88. crw--w---- 1 root tty 4, 15 Sep 26 17:41 tty15
  89. crw--w---- 1 root tty 4, 16 Sep 26 17:41 tty16
  90. crw--w---- 1 root tty 4, 17 Sep 26 17:41 tty17
  91. crw--w---- 1 root tty 4, 18 Sep 26 17:41 tty18
  92. crw--w---- 1 root tty 4, 19 Sep 26 17:41 tty19
  93. crw--w---- 1 root tty 4, 2 Sep 26 17:41 tty2
  94. crw--w---- 1 root tty 4, 20 Sep 26 17:41 tty20
  95. crw--w---- 1 root tty 4, 21 Sep 26 17:41 tty21
  96. crw--w---- 1 root tty 4, 22 Sep 26 17:41 tty22
  97. crw--w---- 1 root tty 4, 23 Sep 26 17:41 tty23
  98. crw--w---- 1 root tty 4, 24 Sep 26 17:41 tty24
  99. crw--w---- 1 root tty 4, 25 Sep 26 17:41 tty25
  100. crw--w---- 1 root tty 4, 26 Sep 26 17:41 tty26
  101. crw--w---- 1 root tty 4, 27 Sep 26 17:41 tty27
  102. crw--w---- 1 root tty 4, 28 Sep 26 17:41 tty28
  103. crw--w---- 1 root tty 4, 29 Sep 26 17:41 tty29
  104. crw--w---- 1 root tty 4, 3 Sep 26 17:41 tty3
  105. crw--w---- 1 root tty 4, 30 Sep 26 17:41 tty30
  106. crw--w---- 1 root tty 4, 31 Sep 26 17:41 tty31
  107. crw--w---- 1 root tty 4, 32 Sep 26 17:41 tty32
  108. crw--w---- 1 root tty 4, 33 Sep 26 17:41 tty33
  109. crw--w---- 1 root tty 4, 34 Sep 26 17:41 tty34
  110. crw--w---- 1 root tty 4, 35 Sep 26 17:41 tty35
  111. crw--w---- 1 root tty 4, 36 Sep 26 17:41 tty36
  112. crw--w---- 1 root tty 4, 37 Sep 26 17:41 tty37
  113. crw--w---- 1 root tty 4, 38 Sep 26 17:41 tty38
  114. crw--w---- 1 root tty 4, 39 Sep 26 17:41 tty39
  115. crw--w---- 1 root tty 4, 4 Sep 26 17:41 tty4
  116. crw--w---- 1 root tty 4, 40 Sep 26 17:41 tty40
  117. crw--w---- 1 root tty 4, 41 Sep 26 17:41 tty41
  118. crw--w---- 1 root tty 4, 42 Sep 26 17:41 tty42
  119. crw--w---- 1 root tty 4, 43 Sep 26 17:41 tty43
  120. crw--w---- 1 root tty 4, 44 Sep 26 17:41 tty44
  121. crw--w---- 1 root tty 4, 45 Sep 26 17:41 tty45
  122. crw--w---- 1 root tty 4, 46 Sep 26 17:41 tty46
  123. crw--w---- 1 root tty 4, 47 Sep 26 17:41 tty47
  124. crw--w---- 1 root tty 4, 48 Sep 26 17:41 tty48
  125. crw--w---- 1 root tty 4, 49 Sep 26 17:41 tty49
  126. crw--w---- 1 root tty 4, 5 Sep 26 17:41 tty5
  127. crw--w---- 1 root tty 4, 50 Sep 26 17:41 tty50
  128. crw--w---- 1 root tty 4, 51 Sep 26 17:41 tty51
  129. crw--w---- 1 root tty 4, 52 Sep 26 17:41 tty52
  130. crw--w---- 1 root tty 4, 53 Sep 26 17:41 tty53
  131. crw--w---- 1 root tty 4, 54 Sep 26 17:41 tty54
  132. crw--w---- 1 root tty 4, 55 Sep 26 17:41 tty55
  133. crw--w---- 1 root tty 4, 56 Sep 26 17:41 tty56
  134. crw--w---- 1 root tty 4, 57 Sep 26 17:41 tty57
  135. crw--w---- 1 root tty 4, 58 Sep 26 17:41 tty58
  136. crw--w---- 1 root tty 4, 59 Sep 26 17:41 tty59
  137. crw--w---- 1 root tty 4, 6 Sep 26 17:41 tty6
  138. crw--w---- 1 root tty 4, 60 Sep 26 17:41 tty60
  139. crw--w---- 1 root tty 4, 61 Sep 26 17:41 tty61
  140. crw--w---- 1 root tty 4, 62 Sep 26 17:41 tty62
  141. crw--w---- 1 root tty 4, 63 Sep 26 17:41 tty63
  142. crw--w---- 1 root tty 4, 7 Sep 26 17:41 tty7
  143. crw--w---- 1 root tty 4, 8 Sep 26 17:41 tty8
  144. crw--w---- 1 root tty 4, 9 Sep 26 17:41 tty9
  145. crw------- 1 root tty 4, 64 Sep 26 17:51 ttyS0
  146. crw--w---- 1 root tty 4, 65 Sep 26 17:41 ttyS1
  147. crw-rw---- 1 root dialout 4, 66 Sep 26 17:41 ttyS2
  148. crw-rw---- 1 root dialout 4, 67 Sep 26 17:41 ttyS3
  149. crw------- 1 root root 10, 223 Sep 26 17:41 uinput
  150. crw-rw-rw- 1 root root 1, 9 Sep 26 17:41 urandom
  151. crw-rw---- 1 root tty 7, 0 Sep 26 17:41 vcs
  152. crw-rw---- 1 root tty 7, 1 Sep 26 17:41 vcs1
  153. crw-rw---- 1 root tty 7, 2 Sep 26 17:41 vcs2
  154. crw-rw---- 1 root tty 7, 3 Sep 26 17:41 vcs3
  155. crw-rw---- 1 root tty 7, 4 Sep 26 17:41 vcs4
  156. crw-rw---- 1 root tty 7, 5 Sep 26 17:41 vcs5
  157. crw-rw---- 1 root tty 7, 6 Sep 26 17:41 vcs6
  158. crw-rw---- 1 root tty 7, 128 Sep 26 17:41 vcsa
  159. crw-rw---- 1 root tty 7, 129 Sep 26 17:41 vcsa1
  160. crw-rw---- 1 root tty 7, 130 Sep 26 17:41 vcsa2
  161. crw-rw---- 1 root tty 7, 131 Sep 26 17:41 vcsa3
  162. crw-rw---- 1 root tty 7, 132 Sep 26 17:41 vcsa4
  163. crw-rw---- 1 root tty 7, 133 Sep 26 17:41 vcsa5
  164. crw-rw---- 1 root tty 7, 134 Sep 26 17:41 vcsa6
  165. crw-rw---- 1 root tty 7, 64 Sep 26 17:41 vcsu
  166. crw-rw---- 1 root tty 7, 65 Sep 26 17:41 vcsu1
  167. crw-rw---- 1 root tty 7, 66 Sep 26 17:41 vcsu2
  168. crw-rw---- 1 root tty 7, 67 Sep 26 17:41 vcsu3
  169. crw-rw---- 1 root tty 7, 68 Sep 26 17:41 vcsu4
  170. crw-rw---- 1 root tty 7, 69 Sep 26 17:41 vcsu5
  171. crw-rw---- 1 root tty 7, 70 Sep 26 17:41 vcsu6
  172. brw-rw---- 1 root disk 253, 0 Sep 26 17:41 vda
  173. crw------- 1 root root 10, 127 Sep 26 17:41 vga_arbiter
  174. crw-rw-rw- 1 root root 10, 126 Sep 26 17:41 vsock
  175. crw-rw-rw- 1 root root 1, 5 Sep 26 17:41 zero
  176.  
  177. sysv + rust coreutils:
  178.  
  179. drwxr-xr-x 15 root root 3.0K Sep 26 18:09 .
  180. drwxr-xr-x 17 root root 1.0K Sep 26 18:09 ..
  181. crw-r--r-- 1 root root 10, 235 Sep 26 18:09 autofs
  182. drwxr-xr-x 2 root root 560 Sep 26 18:09 block
  183. drwxr-xr-x 2 root root 60 Sep 26 18:09 bsg
  184. crw-rw---- 1 root disk 10, 234 Sep 26 18:09 btrfs-control
  185. drwxr-xr-x 3 root root 60 Sep 26 18:09 bus
  186. lrwxrwxrwx 1 root root 3 Sep 26 18:09 cdrom -> sr0
  187. drwxr-xr-x 2 root root 2.4K Sep 26 18:09 char
  188. crw------- 1 root root 5, 1 Sep 26 18:09 console
  189. drwxr-xr-x 6 root root 120 Sep 26 18:09 cpu
  190. crw------- 1 root root 10, 125 Sep 26 18:09 cpu_dma_latency
  191. crw------- 1 root root 10, 203 Sep 26 18:09 cuse
  192. drwxr-xr-x 5 root root 100 Sep 26 18:09 disk
  193. drwxr-xr-x 3 root root 80 Sep 26 18:09 dri
  194. crw-rw---- 1 root video 29, 0 Sep 26 18:09 fb0
  195. lrwxrwxrwx 1 root root 13 Sep 26 18:09 fd -> /proc/self/fd
  196. crw-rw-rw- 1 root root 1, 7 Sep 26 18:09 full
  197. crw-rw-rw- 1 root root 10, 229 Sep 26 18:09 fuse
  198. crw------- 1 root root 10, 228 Sep 26 18:09 hpet
  199. crw------- 1 root root 10, 183 Sep 26 18:09 hwrng
  200. prw------- 1 root root 0 Sep 26 18:09 initctl
  201. drwxr-xr-x 4 root root 180 Sep 26 18:09 input
  202. crw-r--r-- 1 root root 1, 11 Sep 26 18:09 kmsg
  203. srw-rw-rw- 1 root root 0 Sep 26 18:09 log
  204. crw-rw---- 1 root disk 10, 237 Sep 26 18:09 loop-control
  205. brw-rw---- 1 root disk 7, 0 Sep 26 18:09 loop0
  206. brw-rw---- 1 root disk 7, 1 Sep 26 18:09 loop1
  207. brw-rw---- 1 root disk 7, 2 Sep 26 18:09 loop2
  208. brw-rw---- 1 root disk 7, 3 Sep 26 18:09 loop3
  209. brw-rw---- 1 root disk 7, 4 Sep 26 18:09 loop4
  210. brw-rw---- 1 root disk 7, 5 Sep 26 18:09 loop5
  211. brw-rw---- 1 root disk 7, 6 Sep 26 18:09 loop6
  212. brw-rw---- 1 root disk 7, 7 Sep 26 18:09 loop7
  213. drwxr-xr-x 2 root root 60 Sep 26 18:09 mapper
  214. lrwxrwxrwx 1 root root 12 Sep 26 18:09 mtab -> /proc/mounts
  215. drwxr-xr-x 2 root root 60 Sep 26 18:09 net
  216. crw-rw-rw- 1 root root 1, 3 Sep 26 18:09 null
  217. crw-r----- 1 root kmem 1, 4 Sep 26 18:09 port
  218. crw------- 1 root root 108, 0 Sep 26 18:09 ppp
  219. crw-rw-rw- 1 root tty 5, 2 Sep 26 18:09 ptmx
  220. drwxr-xr-x 2 root root 0 Sep 26 18:09 pts
  221. brw-rw---- 1 root disk 1, 0 Sep 26 18:09 ram0
  222. brw-rw---- 1 root disk 1, 1 Sep 26 18:09 ram1
  223. brw-rw---- 1 root disk 1, 10 Sep 26 18:09 ram10
  224. brw-rw---- 1 root disk 1, 11 Sep 26 18:09 ram11
  225. brw-rw---- 1 root disk 1, 12 Sep 26 18:09 ram12
  226. brw-rw---- 1 root disk 1, 13 Sep 26 18:09 ram13
  227. brw-rw---- 1 root disk 1, 14 Sep 26 18:09 ram14
  228. brw-rw---- 1 root disk 1, 15 Sep 26 18:09 ram15
  229. brw-rw---- 1 root disk 1, 2 Sep 26 18:09 ram2
  230. brw-rw---- 1 root disk 1, 3 Sep 26 18:09 ram3
  231. brw-rw---- 1 root disk 1, 4 Sep 26 18:09 ram4
  232. brw-rw---- 1 root disk 1, 5 Sep 26 18:09 ram5
  233. brw-rw---- 1 root disk 1, 6 Sep 26 18:09 ram6
  234. brw-rw---- 1 root disk 1, 7 Sep 26 18:09 ram7
  235. brw-rw---- 1 root disk 1, 8 Sep 26 18:09 ram8
  236. brw-rw---- 1 root disk 1, 9 Sep 26 18:09 ram9
  237. crw-rw-rw- 1 root root 1, 8 Sep 26 18:09 random
  238. crw-rw-r-- 1 root root 10, 242 Sep 26 18:09 rfkill
  239. lrwxrwxrwx 1 root root 4 Sep 26 18:09 rtc -> rtc0
  240. crw------- 1 root root 254, 0 Sep 26 18:09 rtc0
  241. drwxrwxrwt 2 root root 40 Sep 26 18:09 shm
  242. drwxr-xr-x 2 root root 80 Sep 26 18:09 snd
  243. brw-rw---- 1 root cdrom 11, 0 Sep 26 18:09 sr0
  244. lrwxrwxrwx 1 root root 15 Sep 26 18:09 stderr -> /proc/self/fd/2
  245. lrwxrwxrwx 1 root root 15 Sep 26 18:09 stdin -> /proc/self/fd/0
  246. lrwxrwxrwx 1 root root 15 Sep 26 18:09 stdout -> /proc/self/fd/1
  247. crw-rw-rw- 1 root tty 5, 0 Sep 26 18:09 tty
  248. crw--w---- 1 root tty 4, 0 Sep 26 18:09 tty0
  249. crw--w---- 1 root root 4, 1 Sep 26 18:09 tty1
  250. crw--w---- 1 root tty 4, 10 Sep 26 18:09 tty10
  251. crw--w---- 1 root tty 4, 11 Sep 26 18:09 tty11
  252. crw--w---- 1 root tty 4, 12 Sep 26 18:09 tty12
  253. crw--w---- 1 root tty 4, 13 Sep 26 18:09 tty13
  254. crw--w---- 1 root tty 4, 14 Sep 26 18:09 tty14
  255. crw--w---- 1 root tty 4, 15 Sep 26 18:09 tty15
  256. crw--w---- 1 root tty 4, 16 Sep 26 18:09 tty16
  257. crw--w---- 1 root tty 4, 17 Sep 26 18:09 tty17
  258. crw--w---- 1 root tty 4, 18 Sep 26 18:09 tty18
  259. crw--w---- 1 root tty 4, 19 Sep 26 18:09 tty19
  260. crw--w---- 1 root tty 4, 2 Sep 26 18:09 tty2
  261. crw--w---- 1 root tty 4, 20 Sep 26 18:09 tty20
  262. crw--w---- 1 root tty 4, 21 Sep 26 18:09 tty21
  263. crw--w---- 1 root tty 4, 22 Sep 26 18:09 tty22
  264. crw--w---- 1 root tty 4, 23 Sep 26 18:09 tty23
  265. crw--w---- 1 root tty 4, 24 Sep 26 18:09 tty24
  266. crw--w---- 1 root tty 4, 25 Sep 26 18:09 tty25
  267. crw--w---- 1 root tty 4, 26 Sep 26 18:09 tty26
  268. crw--w---- 1 root tty 4, 27 Sep 26 18:09 tty27
  269. crw--w---- 1 root tty 4, 28 Sep 26 18:09 tty28
  270. crw--w---- 1 root tty 4, 29 Sep 26 18:09 tty29
  271. crw--w---- 1 root tty 4, 3 Sep 26 18:09 tty3
  272. crw--w---- 1 root tty 4, 30 Sep 26 18:09 tty30
  273. crw--w---- 1 root tty 4, 31 Sep 26 18:09 tty31
  274. crw--w---- 1 root tty 4, 32 Sep 26 18:09 tty32
  275. crw--w---- 1 root tty 4, 33 Sep 26 18:09 tty33
  276. crw--w---- 1 root tty 4, 34 Sep 26 18:09 tty34
  277. crw--w---- 1 root tty 4, 35 Sep 26 18:09 tty35
  278. crw--w---- 1 root tty 4, 36 Sep 26 18:09 tty36
  279. crw--w---- 1 root tty 4, 37 Sep 26 18:09 tty37
  280. crw--w---- 1 root tty 4, 38 Sep 26 18:09 tty38
  281. crw--w---- 1 root tty 4, 39 Sep 26 18:09 tty39
  282. crw--w---- 1 root tty 4, 4 Sep 26 18:09 tty4
  283. crw--w---- 1 root tty 4, 40 Sep 26 18:09 tty40
  284. crw--w---- 1 root tty 4, 41 Sep 26 18:09 tty41
  285. crw--w---- 1 root tty 4, 42 Sep 26 18:09 tty42
  286. crw--w---- 1 root tty 4, 43 Sep 26 18:09 tty43
  287. crw--w---- 1 root tty 4, 44 Sep 26 18:09 tty44
  288. crw--w---- 1 root tty 4, 45 Sep 26 18:09 tty45
  289. crw--w---- 1 root tty 4, 46 Sep 26 18:09 tty46
  290. crw--w---- 1 root tty 4, 47 Sep 26 18:09 tty47
  291. crw--w---- 1 root tty 4, 48 Sep 26 18:09 tty48
  292. crw--w---- 1 root tty 4, 49 Sep 26 18:09 tty49
  293. crw--w---- 1 root tty 4, 5 Sep 26 18:09 tty5
  294. crw--w---- 1 root tty 4, 50 Sep 26 18:09 tty50
  295. crw--w---- 1 root tty 4, 51 Sep 26 18:09 tty51
  296. crw--w---- 1 root tty 4, 52 Sep 26 18:09 tty52
  297. crw--w---- 1 root tty 4, 53 Sep 26 18:09 tty53
  298. crw--w---- 1 root tty 4, 54 Sep 26 18:09 tty54
  299. crw--w---- 1 root tty 4, 55 Sep 26 18:09 tty55
  300. crw--w---- 1 root tty 4, 56 Sep 26 18:09 tty56
  301. crw--w---- 1 root tty 4, 57 Sep 26 18:09 tty57
  302. crw--w---- 1 root tty 4, 58 Sep 26 18:09 tty58
  303. crw--w---- 1 root tty 4, 59 Sep 26 18:09 tty59
  304. crw--w---- 1 root tty 4, 6 Sep 26 18:09 tty6
  305. crw--w---- 1 root tty 4, 60 Sep 26 18:09 tty60
  306. crw--w---- 1 root tty 4, 61 Sep 26 18:09 tty61
  307. crw--w---- 1 root tty 4, 62 Sep 26 18:09 tty62
  308. crw--w---- 1 root tty 4, 63 Sep 26 18:09 tty63
  309. crw--w---- 1 root tty 4, 7 Sep 26 18:09 tty7
  310. crw--w---- 1 root tty 4, 8 Sep 26 18:09 tty8
  311. crw--w---- 1 root tty 4, 9 Sep 26 18:09 tty9
  312. crw------- 1 root tty 4, 64 Sep 26 18:09 ttyS0
  313. crw--w---- 1 root root 4, 65 Sep 26 18:09 ttyS1
  314. crw-rw---- 1 root dialout 4, 66 Sep 26 18:09 ttyS2
  315. crw-rw---- 1 root dialout 4, 67 Sep 26 18:09 ttyS3
  316. crw------- 1 root root 10, 223 Sep 26 18:09 uinput
  317. crw-rw-rw- 1 root root 1, 9 Sep 26 18:09 urandom
  318. crw-rw---- 1 root tty 7, 0 Sep 26 18:09 vcs
  319. crw-rw---- 1 root tty 7, 1 Sep 26 18:09 vcs1
  320. crw-rw---- 1 root tty 7, 128 Sep 26 18:09 vcsa
  321. crw-rw---- 1 root tty 7, 129 Sep 26 18:09 vcsa1
  322. crw-rw---- 1 root tty 7, 64 Sep 26 18:09 vcsu
  323. crw-rw---- 1 root tty 7, 65 Sep 26 18:09 vcsu1
  324. brw-rw---- 1 root disk 253, 0 Sep 26 18:09 vda
  325. crw------- 1 root root 10, 127 Sep 26 18:09 vga_arbiter
  326. crw-rw-rw- 1 root root 10, 126 Sep 26 18:09 vsock
  327. crw-rw-rw- 1 root root 1, 5 Sep 26 18:09 zero
  328.  
  329. -----
  330.  
  331. In wrote a little script to check access to /dev entries for root, sudo and non sudo users and ran it on a systemd and sys-v image.
  332.  
  333. Access permissions define who is allowed to access what and there are some files on sys-v where root has no write access.
  334.  
  335. ===>
  336. /dev/fd -> /proc/self/fd
  337. ls /dev/fd
  338. 0
  339. 1
  340. 2
  341. 3
  342. Access: (0500/dr-x------) Uid: ( 0/ root) Gid: ( 0/ root) : /proc/self/fd
  343. /proc/self/fd is readable for monitoring
  344. /proc/self/fd is readable for root
  345. /proc/self/fd is NOT writeable for monitoring
  346. ---> /proc/self/fd is NOT writeable for root <---
  347. <===
  348. ===>
  349. /dev/mtab -> /proc/mounts -> /proc/self/mounts
  350. cat /dev/mtab
  351. /dev/root / ext4 rw,relatime 0 0
  352. devtmpfs /dev devtmpfs rw,relatime,size=109152k,nr_inodes=27288,mode=755 0 0
  353. proc /proc proc rw,relatime 0 0
  354. sysfs /sys sysfs rw,relatime 0 0
  355. none /sys/kernel/debug debugfs rw,relatime 0 0
  356. tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
  357. tmpfs /var/volatile tmpfs rw,relatime 0 0
  358. devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
  359. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) : /proc/mounts
  360. /proc/mounts is readable for monitoring
  361. /proc/mounts is readable for root
  362. /proc/mounts is NOT writeable for monitoring
  363. ---> /proc/mounts is NOT writeable for root <---
  364. Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) : /proc/self/mounts
  365. /proc/self/mounts is readable for monitoring
  366. /proc/self/mounts is readable for root
  367. /proc/self/mounts is NOT writeable for monitoring
  368. ---> /proc/self/mounts is NOT writeable for root <---
  369. <===
  370.  
  371. Now here comes the fun!!!
  372.  
  373. systemd does not seem to create /dev/mtab and /dev/fd has different permissions:
  374.  
  375. systemd:
  376.  
  377. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/fd
  378. /dev/fd is readable for monitoring
  379. /dev/fd is readable for nonroot
  380. /dev/fd is readable for root
  381. /dev/fd is writeable for monitoring
  382. /dev/fd is writeable for nonroot
  383. /dev/fd is writeable for root
  384.  
  385. sys-v:
  386.  
  387. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/fd
  388. /dev/fd is readable for monitoring
  389. /dev/fd is readable for nonroot
  390. /dev/fd is readable for root
  391. /dev/fd is NOT writeable for monitoring
  392. /dev/fd is NOT writeable for nonroot
  393. ---> /dev/fd is NOT writeable for root <---
  394.  
  395. that's not permissions, since those seems to be the same, but the actual device ;)
  396.  
  397. some permissions are slightly different:
  398.  
  399. systemd:
  400.  
  401. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/initctl
  402.  
  403. sys-v:
  404.  
  405. Access: (0600/prw-------) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/initctl
  406.  
  407. with the same effect on reading/writing, but one is a symlink and the other a pipe
  408.  
  409. systemd:
  410.  
  411. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/log
  412.  
  413. sys-v:
  414.  
  415. Access: (0666/srw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/log
  416.  
  417. the "setuid" bit, which might have security implications ;)
  418.  
  419. systemd:
  420.  
  421. Access: (0620/crw--w----) Uid: ( 0/ root) Gid: ( 5/ tty) : /dev/tty1
  422.  
  423. sys-v:
  424.  
  425. Access: (0620/crw--w----) Uid: ( 0/ root) Gid: ( 0/ root) : /dev/tty1
  426.  
  427.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement