'Permission Denied when trying to write on a TPU VM foler

I use Cloud SDK to connect to my TPU VM, but I am getting Permission Denied error when trying to write on a folder in the vm.

How can I fix this please!



Solution 1:[1]

use this command:

sudo vi [filename]

Then, change to Insert Mode and save.
This works for me, but you may need to assure that you are connected to the TPU VM.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tyler2P