You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AWS SageMaker环境下文件所有者异常及SSH权限报错求助

AWS SageMaker环境下文件所有者异常及SSH权限报错求助

各位好,我遇到了一个棘手的SageMaker权限问题,想请教大家怎么解决:

今天我在AWS SageMaker Studio里提交文件到远程仓库时,突然遇到了SSH权限报错,具体信息如下:

Bad owner or permissions on /home/sagemaker-user/.ssh/config

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我做了一些排查,发现问题根源可能和用户目录的所有者异常有关:

  • 查看/home目录的权限信息时,发现我的主目录/home/sagemaker-user/的所有者居然是sagemaker-studio和一个未知的UID(65534),而不是预期的sagemaker-user:
sagemaker-user@studio$ ls -la /home

total 4

drwxr-xr-x  1 root             root               30 Feb 27 14:18 .

drwxr-xr-x  1 root             root               73 Feb 27 14:18 ..

drwx------  2 sagemaker-studio sagemaker-studio   62 Feb 27 14:18 sagemaker-studio

drwx------ 22 sagemaker-studio            65534 6144 Feb 27 14:47 sagemaker-user
  • 尝试用chown命令递归修改目录所有者,但哪怕切换到root用户执行,也提示操作不被允许:
sagemaker-user@studio$ sudo su root

root@studio$ sudo chown -R sagemaker-user /home/sagemaker-user/

...

chown: changing ownership of XXXX Operation not permitted
  • 我也试过尝试切换到sagemaker-studio用户来修改,但sudo切换时需要输入密码,而我根本不知道这个用户的密码。
  • 更奇怪的是,当我以默认的sagemaker-user身份新建文件时,文件的所有者居然是sagemaker-studio:
sagemaker-user@studio$ whoami

sagemaker-user

sagemaker-user@studio$ touch test

sagemaker-user@studio$ ls -la test

-rw-r--r-- 1 sagemaker-studio users 0 Feb 27 15:05 test

这个问题是突然出现的,我账号下其他的SageMaker域都正常,所有文件的所有者都是sagemaker-user。当前这个异常的SageMaker环境是基于CentOS系统的,有没有朋友遇到过类似问题,或者知道怎么修复这个权限异常呢?

备注:内容来源于stack exchange,提问作者Gonzalo Hernandez

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 12:12:37