luci-mod-system.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. {
  2. "luci-mod-system-config": {
  3. "description": "Grant access to system configuration",
  4. "read": {
  5. "ubus": {
  6. "luci": [ "getInitList", "getLEDs", "getLocaltime", "getTimezones", "getUSBDevices" ]
  7. },
  8. "uci": [ "luci", "system" ]
  9. },
  10. "write": {
  11. "ubus": {
  12. "luci": [ "setInitAction", "setLocaltime", "setPassword" ]
  13. },
  14. "uci": [ "luci", "system" ]
  15. }
  16. },
  17. "luci-mod-system-ssh": {
  18. "description": "Grant access to SSH configuration",
  19. "read": {
  20. "file": {
  21. "/etc/dropbear/authorized_keys": [ "read" ]
  22. },
  23. "ubus": {
  24. "file": [ "read" ]
  25. },
  26. "uci": [ "dropbear" ]
  27. },
  28. "write": {
  29. "file": {
  30. "/etc/dropbear/authorized_keys": [ "write" ]
  31. },
  32. "ubus": {
  33. "file": [ "write" ],
  34. "luci": [ "setInitAction", "setLocaltime" ]
  35. },
  36. "uci": [ "dropbear" ]
  37. }
  38. },
  39. "luci-mod-system-init": {
  40. "description": "Grant access to startup configuration",
  41. "read": {
  42. "file": {
  43. "/etc/rc.local": [ "read" ]
  44. },
  45. "ubus": {
  46. "file": [ "read" ],
  47. "luci": [ "getInitList" ]
  48. }
  49. },
  50. "write": {
  51. "file": {
  52. "/etc/rc.local": [ "write" ]
  53. },
  54. "ubus": {
  55. "file": [ "write" ],
  56. "luci": [ "setInitAction" ]
  57. }
  58. }
  59. },
  60. "luci-mod-system-cron": {
  61. "description": "Grant access to crontab configuration",
  62. "read": {
  63. "file": {
  64. "/etc/crontabs/root": [ "read" ]
  65. },
  66. "ubus": {
  67. "file": [ "read" ]
  68. }
  69. },
  70. "write": {
  71. "file": {
  72. "/etc/crontabs/root": [ "write" ]
  73. },
  74. "ubus": {
  75. "file": [ "write" ]
  76. }
  77. }
  78. },
  79. "luci-mod-system-mounts": {
  80. "description": "Grant access to mount configuration",
  81. "read": {
  82. "file": {
  83. "/etc/filesystems": [ "read" ],
  84. "/proc/filesystems": [ "read" ],
  85. "/usr/bin/btrfsck": [ "list" ],
  86. "/usr/bin/ntfsfix": [ "list" ],
  87. "/usr/sbin/e2fsck": [ "list" ],
  88. "/usr/sbin/fsck.f2fs": [ "list" ],
  89. "/usr/sbin/fsck.fat": [ "list" ]
  90. },
  91. "ubus": {
  92. "file": [ "read", "stat" ],
  93. "luci": [ "getBlockDevices", "getMountPoints" ]
  94. },
  95. "uci": [ "fstab" ]
  96. },
  97. "write": {
  98. "file": {
  99. "/etc/crontabs/root": [ "write" ],
  100. "/bin/umount": [ "exec" ],
  101. "/sbin/block": [ "exec" ]
  102. },
  103. "ubus": {
  104. "file": [ "exec", "write" ],
  105. "luci": [ "setBlockDetect" ]
  106. },
  107. "uci": [ "fstab" ]
  108. }
  109. },
  110. "luci-mod-system-flash": {
  111. "description": "Grant access to flash operations",
  112. "read": {
  113. "cgi-io": [ "backup", "download" ],
  114. "file": {
  115. "/dev/mtdblock[0-9]*": [ "read" ],
  116. "/etc/sysupgrade.conf": [ "read" ],
  117. "/lib/upgrade/platform.sh": [ "list" ],
  118. "/proc/mounts": [ "read" ],
  119. "/proc/mtd": [ "read" ],
  120. "/proc/partitions": [ "read" ],
  121. "/proc/sys/kernel/hostname": [ "read" ],
  122. "/sbin/sysupgrade --list-backup": [ "exec" ]
  123. },
  124. "ubus": {
  125. "file": [ "exec", "read", "stat" ]
  126. }
  127. },
  128. "write": {
  129. "cgi-io": [ "upload" ],
  130. "file": {
  131. "/bin/tar -tzf /tmp/backup.tar.gz": [ "exec" ],
  132. "/etc/sysupgrade.conf": [ "write" ],
  133. "/sbin/firstboot -r -y": [ "exec" ],
  134. "/sbin/reboot": [ "exec" ],
  135. "/sbin/sysupgrade --force /tmp/firmware.bin": [ "exec" ],
  136. "/sbin/sysupgrade -n --force /tmp/firmware.bin": [ "exec" ],
  137. "/sbin/sysupgrade -n /tmp/firmware.bin": [ "exec" ],
  138. "/sbin/sysupgrade --restore-backup /tmp/backup.tar.gz": [ "exec" ],
  139. "/sbin/sysupgrade --test /tmp/firmware.bin": [ "exec" ],
  140. "/sbin/sysupgrade /tmp/firmware.bin": [ "exec" ],
  141. "/tmp/backup.tar.gz": [ "write" ],
  142. "/tmp/firmware.bin": [ "write" ]
  143. },
  144. "ubus": {
  145. "file": [ "exec", "remove", "write" ],
  146. "system": [ "validate_firmware_image" ]
  147. }
  148. }
  149. },
  150. "luci-mod-system-reboot": {
  151. "description": "Allow rebooting the device",
  152. "write": {
  153. "file": {
  154. "/sbin/reboot": [ "exec" ]
  155. },
  156. "ubus": {
  157. "file": [ "exec" ],
  158. "system": [ "reboot" ]
  159. }
  160. }
  161. }
  162. }