使用最新的 django-cms 包 - 它需要一个名为 ipdb。
我安装了它,现在我无法克服错误:
[Errno 13] Permission denied: '/var/www/.ipython'
我更改了文件夹的权限,但它不起作用。
我还手动创建了该文件 - 但错误是:
[Errno 17] File exists: '/var/www/.ipython'
我的 google-foo 无法解决此问题。
我将此文件夹的权限更改为当前用于登录的用户。是否有一个我不知道的特定用户可以应用于此文件夹?
固定的!
在建议之后,我进一步浏览以使其工作:
- chmod 777 在其父文件夹上将包含 .ipython 文件
- chmod 777 在 .ipython 上
- 再次创建 chmod 755 到父文件夹上。
作品!
看来这个文件必须是可执行的 - 当然我不希望它出现在我的主文件夹中,所以我可以允许它被创建,然后恢复我的更改。
谢谢你们的建议
Using the most recent package of django-cms - it requires a package called ipdb.
I installed it and now I cannot get past the error:
[Errno 13] Permission denied: '/var/www/.ipython'
I changed the permission of the folder and it didn't work.
I also created the file manually - but then the error is:
[Errno 17] File exists: '/var/www/.ipython'
My google-foo has faulted to resolve this.
The permissions on this folder I changed to the current user used to login. Is there a particular user I can apply to this folder of which I don't know about?
Fixed!
After the advice I had a further poke around to get it working:
- chmod 777 on the parent folder of which will contain the .ipython file
- chmod 777 on the .ipython once created
- chmod 755 onto parent folder again.
Works!
It seems this file must be executable - of course I don't want that on my main folder, so I can allow it to be created and then revert my changes.
Thanks you both for your advice
发布评论
评论(1)
不允许您尝试访问 /var/www 的用户这样做。您可以使用不同的用户,或者更改 /var/www 的权限。
顺便说一句,这不是一个Python问题,这是一个Linux问题。
使用 ls -l /var/www 可以查看谁可以在目录中创建新文件。
一个小指南将向您解释 Linux 中权限的工作原理: http://www.linuxquestions .org/linux/answers/Security/Quick_and_Dirty_Guide_to_Linux_File_Permissions
The user with which you are trying to access /var/www isn't allowed to do so. You either use a different user or you change the permissions of /var/www.
This is btw not a python question, it's a linux question.
With
ls -l /var/www
you can see who is allowed to create new files inside the directory.A little guide that shall explain to you how permissions work in linux: http://www.linuxquestions.org/linux/answers/Security/Quick_and_Dirty_Guide_to_Linux_File_Permissions