Code Monkey home page Code Monkey logo

Comments (2)

amtoaer avatar amtoaer commented on June 7, 2024

你说的权限无法更改,我理解是因为 chmod 没有用 sudo 执行。
至于权限不同的问题,fs::copy 在标准库文档中明确指出:

This function will also copy the permission bits of the original file to the destination file.

所以我不太能确定你这个是什么情况,没理由默认会把权限设置成这样的,我这里也是正常的(文件夹755,文件644):
image

另外,推荐在 docker 运行时指定 user 选项,这样容器会以用户权限运行,创建出来的内容所有者也都是用户本身而非 root。

from bili-sync.

ky0utarou avatar ky0utarou commented on June 7, 2024

是的,我当时也觉得标准库不会做额外的事情,应该跟copy的代码没关系

推荐在 docker 运行时指定 user 选项,这样容器会以用户权限运行,创建出来的内容所有者也都是用户本身而非 root

确实是这个问题,改成host用户的uid和gid之后权限就正常了

from bili-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.