虚拟环境是否会改变全球访问权限?
我已经使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.