我是 Linux 管理的新手。我从远程 Ubuntu 服务器中删除了我的 Django 项目目录。该项目位于:
/usr/local/lib/python2.7/dist-packages/django/my_proj
所以我删除了 my_proj doing rm -rf my_proj
,然后我重新创建了 my_proj doing
sudo mkdir my_proj
.
然后我回到我的本地 Windows putty 应用程序,并运行以下命令:
pscp -r C:\Users\workspace\my_proj my_username@remove_server_url:/usr/local/lib/python2.7/dist-packages/django/my_proj
我得到permission denied to create folder error
了 my_proj 中的每个文件和目录。我试图在 Ubuntu 中运行 chmod 命令,比如
sudo chmod -R 777 /usr/local/lib/python2.7/dist-packages/django/my_proj/
...但得到奇怪的错误:
sudo /usr/bin/sudo must be owned by uid 0 and have the setuid bit set