虚拟环境是否会改变全球访问权限?

发布于 2025-01-27 05:36:24 字数 123 浏览 3 评论 0原文

我已经使用chmod通过Linux终端更改了一些文件的用户权限。我只是意识到我一直在虚拟环境中工作。这是否意味着更改仅在环境或外部也反映?

我必须在环境外再次做吗?

请建议。

I have changed some files' user permissions through Linux terminal using chmod. I just realized that I was working in a virtual environment throughout. Does this mean that the changes have been reflected only within the environment or outside as well?

Do I have to do it again outside the environment?

Please suggest.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟花易冷人易散 2025-02-03 05:36:24

Python虚拟环境不是虚拟机或容器,它们不能在环境外保护主机OS。环境的激活只会将其bin/添加到$ path在当前终端中,没有什么花哨的。

即使激活环境,您也可以在任何环境外的任何文件中执行任何操作(包括CHMOD)。

Python virtual environments are not virtual machines or containers, they do not protect the host OS outside of the environments. Activation of an environment just prepends its bin/ to $PATH in the current terminal, nothing fancy.

You can do anything (including chmod) with any file outside of any environment even if an environment is activated.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文