Today I tried to get VSCode installed but there are a few things preventing me to do this.
It seems in Fangtooth this vulnerability has already been patched:
The boot pool is now properly enforcing the default setuid and noexec options (NAS-127825). This restores the default boot pool behavior to be restricted from general use. Users that are currently attempting to exec scripts from a /home or other boot pool location should move these to a data pool location.
I am using ssh keys to connect and everything seems to work, I select which system, it asks me for a passphrase and after that I “should” connect. However I get these errors:
kill: No such processsh: 401: /home/truenas_admin/.vscode-server/code-blabla: Permission denied
It means that it is working as intended. I also tried turning on TCP forwarding on SSH service in TN without success.
Here is my problem. Do I move the user to a dataset on another pool?
I would have to move the user from boot-pool to my other pool which is not so straight forward if I look at the UI:
Because that’s what VSCode does when you use it this way, which is an extremely convenient way to use it: it connects to the server in question, installs an agent in the specified user’s home directory, and uses that to do the rest of its thing.
It appears TrueNAS doesn’t allow you to change the home directory for the admin (or now, for some reason, truenas_admin) user. Of course, there’s no reason you couldn’t set up another admin user and set that user’s home directory to be somewhere other than /home.
I also made sure that I pointed my home directory to the new pool.
I recreated the connection in VSCode with the new user but I used the same SSH keys in the config. I also added the public key to the user account in Truenas and voila: