On Thu, Apr 13, 2017 at 9:13 AM, Mark Yoder <[email protected]> wrote: > Robert: > Presently Cloud 9 runs as root. Would it be possible for it to run as > debian instead? That would mean the examples would have to run with sudo. > > Seems like this would be much more secure.
With yesterday's build It's actually really really easy: https://www.freedesktop.org/software/systemd/man/systemd.exec.html# User=debian cat /lib/systemd/system/cloud9.service [Unit] Description=Cloud9 IDE ConditionPathExists=|/var/lib/cloud9 [Service] WorkingDirectory=/opt/cloud9/build/standalonebuild EnvironmentFile=/etc/default/cloud9 ExecStart=/usr/bin/nodejs server.js --packed -w /var/lib/cloud9 SyslogIdentifier=cloud9ide User=debian Still a few issues: https://i.imgur.com/amVHbaE.png Apr 13 14:34:29 beaglebone cloud9ide[528]: LISTEN_FDS = 1 Apr 13 14:34:29 beaglebone cloud9ide[528]: Connect server listening at http://127.0.0.1:3000 Apr 13 14:34:30 beaglebone cloud9ide[528]: CDN: version standalone initialized /opt/cloud9/build/standalonebuild/build Apr 13 14:34:30 beaglebone systemd-timesyncd[273]: Synchronized to time server 154.16.245.246:123 (2.debian.pool.ntp.org). Apr 13 14:34:32 beaglebone cloud9ide[528]: Started '/opt/cloud9/build/standalonebuild/configs/standalone' with config 'standalone'! Apr 13 14:34:32 beaglebone cloud9ide[528]: Cloud9 is up and running Apr 13 14:34:35 beaglebone cloud9ide[528]: cache /opt/cloud9/build/standalonebuild/build/standalone/config/default.js Apr 13 14:34:35 beaglebone cloud9ide[528]: cache hit /opt/cloud9/build/standalonebuild/build/standalone/config/default.js Apr 13 14:34:36 beaglebone bonescript-autorun[348]: 4:4:60-ti-r97 Apr 13 14:34:36 beaglebone cloud9ide[528]: cache /opt/cloud9/build/standalonebuild/build/standalone/skin/default/dark.css Apr 13 14:34:36 beaglebone cloud9ide[528]: cache hit /opt/cloud9/build/standalonebuild/build/standalone/skin/default/dark.css Apr 13 14:34:36 beaglebone bonescript-autorun[348]: info: Starting bonescript autorun service Apr 13 14:34:36 beaglebone cloud9ide[528]: cache /opt/cloud9/build/standalonebuild/build/standalone/modules/ace/theme/cloud9_night_low_color.js Apr 13 14:34:36 beaglebone cloud9ide[528]: cache hit /opt/cloud9/build/standalonebuild/build/standalone/modules/ace/theme/cloud9_night_low_color.js Apr 13 14:34:37 beaglebone cloud9ide[528]: cache /opt/cloud9/build/standalonebuild/build/standalone/worker/plugins/c9.ide.language.core/worker.js Apr 13 14:34:37 beaglebone cloud9ide[528]: cache /opt/cloud9/build/standalonebuild/build/standalone/modules/ace/theme/idle_fingers.js Apr 13 14:34:37 beaglebone cloud9ide[528]: cache hit /opt/cloud9/build/standalonebuild/build/standalone/worker/plugins/c9.ide.language.core/worker.js Apr 13 14:34:37 beaglebone cloud9ide[528]: cache hit /opt/cloud9/build/standalonebuild/build/standalone/modules/ace/theme/idle_fingers.js Apr 13 14:34:42 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/opt/cloud9/.c9/user.settings' Apr 13 14:34:42 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:42 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/var/lib/cloud9/.c9/project.settings' Apr 13 14:34:42 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:42 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/var/lib/cloud9/.c9/state.settings' Apr 13 14:34:42 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:42 beaglebone cloud9ide[528]: 768: Error: ENOENT: no such file or directory, open '/var/lib/cloud9/.c9/metadata/tab2' Apr 13 14:34:42 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:47 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/var/lib/cloud9/.c9/state.settings' Apr 13 14:34:47 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:47 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/var/lib/cloud9/.c9/state.settings' Apr 13 14:34:47 beaglebone cloud9ide[528]: at Error (native) Apr 13 14:34:59 beaglebone cloud9ide[528]: 768: Error: EACCES: permission denied, open '/var/lib/cloud9/.c9/state.settings' Apr 13 14:34:59 beaglebone cloud9ide[528]: at Error (native) (i'm going to create "cloud9" group and tie /var/lib/cloud9/ and debian to that group.. and all the examples are broken: (aka |> Run button) https://i.imgur.com/rNt0TPR.png So other then all bonescript examples broken, it works. ;) @Drew, in the python adafruit library you have a gpio/etc debian permission script, wonder if we should enable that by default, then the bonescript examples would work as debian user. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYgBkMZiTKd3jtpfFA2ez7kB%3DHOBUn2QMzsZ25TMYDGrbQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
