處理 vscode remote-ssh 開新檔案 權限無法設定成 群組可讀的問題
drwxrwxr-x 2 ubuntu ubuntu 4096 Jun 16 09:04 test1/
-rw-rw-r– 1 brian brian 0 Jun 16 08:59 u

為了能在同主機的開發環境,會先將帳號加入同個群組。預期希望開新檔案時,能加入群組可寫的權限,使用SSH登入方法
可從./bashrc 設定成功並套用,但vscode 可能某些原因無法成功。

故目前找到的方法為 修改 sudo nano /etc/login.defs

參數 USERGROUPS_ENAB no to yes

#
# Enable setting of the umask group bits to be the same as owner bits
# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is
# the same as gid, and username is the same as the primary group name.
#
# If set to yes, userdel will remove the user’s group if it contains no
# more members, and useradd will create by default a group with the name
# of the user.
#
USERGROUPS_ENAB no

cloud orcale 的ubuntu設定 預設為 yes
cloud aws 的ubuntu設定 預設為no

參考 https://stackoverflow.com/questions/51674627/insufficient-permissions-in-vscode

參考 如果vscode可以使用 remoteCommand 也許ok ,但目前測試不成功
https://github.com/microsoft/vscode-remote-release/issues/141

Hits: 25