tao-shen Claude Opus 4.6 commited on
Commit
444d40a
·
1 Parent(s): a0dcc38

fix: chown /home/tao-shen after restore (old uid mapping)

Browse files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. entrypoint.py +2 -0
entrypoint.py CHANGED
@@ -408,6 +408,8 @@ def ensure_passwords():
408
  sh("usermod -aG sudo tao-shen 2>/dev/null || true")
409
  sh("echo 'tao-shen ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tao-shen")
410
  sh("chmod 440 /etc/sudoers.d/tao-shen")
 
 
411
  # Copy root's SSH keys to tao-shen if needed
412
  if os.path.exists("/root/.ssh/authorized_keys"):
413
  sh("mkdir -p /home/tao-shen/.ssh")
 
408
  sh("usermod -aG sudo tao-shen 2>/dev/null || true")
409
  sh("echo 'tao-shen ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/tao-shen")
410
  sh("chmod 440 /etc/sudoers.d/tao-shen")
411
+ # Fix home dir ownership (restore may bring old uid mapping)
412
+ sh("chown tao-shen:tao-shen /home/tao-shen")
413
  # Copy root's SSH keys to tao-shen if needed
414
  if os.path.exists("/root/.ssh/authorized_keys"):
415
  sh("mkdir -p /home/tao-shen/.ssh")