-bash:./ manage.py:权限被拒绝

ssh*_*win 34 python django django-south

运行后: $ ./manage.py migrate 我收到以下错误:

-bash: ./manage.py: Permission denied
Run Code Online (Sandbox Code Playgroud)

尝试在DB中进行更改后运行迁移.任何建议都会非常感激.

zee*_*kay 69

您需要使用manage.py可执行文件来执行它.不要chmod +x manage.py让它excecutable.或者你可以做python manage.py <cmd>.


Bam*_*aly 11

要为包含脚本的文件授予自己的执行权限,请使用以下命令:

chmod u+rwx filename.py
Run Code Online (Sandbox Code Playgroud)

要授予其他用户读取和执行但不更改shell脚本的权限,请使用:

chmod go+rx filename.py
Run Code Online (Sandbox Code Playgroud)

参考http://unixhelp.ed.ac.uk/scrpt/scrpt1.2.html