We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user@sv:/ABC$ ls -lh total 42M ---------- 1 root root 60K May 3 08:00 'ABC-fanart.jpg' -rwxrwxrwx+ 1 root root 42M May 3 08:00 'ABC.mp4' -rwxrwxrwx+ 1 root root 476 May 3 08:00 'ABC.nfo' -rwxrwxrwx+ 1 root root 60K May 3 08:00 'ABC-poster.jpg' -rwxrwxrwx+ 1 root root 1.2K May 3 08:00 'ABC.zh-CN.default.ass' user@sv:/ABC$ chmod --reference=ABC-poster.jpg ABC-fanart.jpg chmod: ‘ABC-fanart.jpg’ is linux mode: Operation not permitted
fanart.jpg似乎是从这里复制出来的,为什么权限和源文件不同且无法更改
fanart.jpg
The text was updated successfully, but these errors were encountered:
你说的权限无法更改,我理解是因为 chmod 没有用 sudo 执行。 至于权限不同的问题,fs::copy 在标准库文档中明确指出:
This function will also copy the permission bits of the original file to the destination file.
所以我不太能确定你这个是什么情况,没理由默认会把权限设置成这样的,我这里也是正常的(文件夹755,文件644):
另外,推荐在 docker 运行时指定 user 选项,这样容器会以用户权限运行,创建出来的内容所有者也都是用户本身而非 root。
Sorry, something went wrong.
是的,我当时也觉得标准库不会做额外的事情,应该跟copy的代码没关系
推荐在 docker 运行时指定 user 选项,这样容器会以用户权限运行,创建出来的内容所有者也都是用户本身而非 root
确实是这个问题,改成host用户的uid和gid之后权限就正常了
No branches or pull requests
fanart.jpg
似乎是从这里复制出来的,为什么权限和源文件不同且无法更改The text was updated successfully, but these errors were encountered: