使用错误的所有者创建的文件

Gon*_*dez 5 linux centos permissions amazon-web-services

我正在使用 AWS sagemaker,今天我去提交一些文件并收到此错误:

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.
Run Code Online (Sandbox Code Playgroud)

我进行了更多调查,发现我的主文件夹的/home/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
Run Code Online (Sandbox Code Playgroud)

我尝试用 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
Run Code Online (Sandbox Code Playgroud)

我还尝试使用“新所有者” sagemaker-studio,但sudo与该用户一起使用时会提示输入我没有的密码。

此外,当登录为默认用户sagemaker-user文件时,会使用错误的用户创建文件

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
Run Code Online (Sandbox Code Playgroud)

在这个圣人领域,这种事情突然发生了。其他域按预期工作(一切都是以sagemaker-user所有者身份创建的)。

Sagemaker 在 centos 上运行(如果有帮助的话)。