./manage.py 权限被拒绝
我正在尝试使用 South 迁移我的 Django 应用程序,但收到权限被拒绝的警告。不过,我以 root 身份登录(我知道,风险风险,只是想进行设置)。那么为什么这会被拒绝呢?
root@Harold:~/OmniCloud/omnicloud: ./manage.py convert_to_south OmniCloud_App
-bash: ./manage.py: Permission denied
I'm trying to migrate my Django app using South and am getting permission denied warning. I'm logged in as root though (I know, risk risk, just trying to get things set-up). Why then does this get rejected?
root@Harold:~/OmniCloud/omnicloud: ./manage.py convert_to_south OmniCloud_App
-bash: ./manage.py: Permission denied
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
manage.py
可能没有设置其可执行位,这是故意的。按照 Django 文档,使用python manage.py
代替。manage.py
probably does not have its executable bit set, which is on purpose. Usepython manage.py
instead as per the Django docs.您需要确保
./manage.py
设置了可执行位:You need to make sure that
./manage.py
has the executable bit set:如果出于任何原因你需要执行manage.py,只需运行:
然而,正如larsmans已经说过的,
python manage.py
是运行它的方式。If for any reason you NEED to execute manage.py just run:
How ever, as larsmans already said,
python manage.py
is the way to run it.您应该在脚本的开头添加以下几行:(
假设解释器位于用户的 PATH 上)
之后,您可以希望使其可执行
,这会有所帮助。
You should add the following lines at the beginning of the script:
(assuming that the interpreter is on the user’s PATH)
After that you can make it executable by
hope, it helps.