Zend_Search_Lucen - [function.fopen]:无法打开流:权限被拒绝
我正在尝试遵循 Ganesh HS 的 Zend Lucene 搜索教程,但它给了我一个错误。
消息:fopen(/home/zerogo/application/lucene-data/read.lock.file)[function.fopen]:无法打开流:权限被拒绝
如果我单击“function.fopen”,它会显示另一条消息:
Exception
Message: Resource 'function.fopen' not found
Stack trace:
#0 /home/zerego/library/Zend/Acl.php(774): Zend_Acl->get('function.fopen')
#1 /home/zerego/application/plugins/AccessCheck.php(26): Zend_Acl->isAllowed('admin', 'function.fopen', 'index')
我的文件夹具有 755 权限,我尝试过 777,但我认为问题出在我的 ACL 上。
我需要在 ACL 中授予某种权限?或者我需要在 de .htaccess 中授予此类权限?
I´m trying to follow the Zend Lucene Search Tutorial from Ganesh H S and it´s giving me an error.
Message: fopen(/home/zerego/application/lucene-data/read.lock.file) [function.fopen]: failed to open stream: Permission denied
And if i click in "function.fopen" it show me an other message:
Exception
Message: Resource 'function.fopen' not found
Stack trace:
#0 /home/zerego/library/Zend/Acl.php(774): Zend_Acl->get('function.fopen')
#1 /home/zerego/application/plugins/AccessCheck.php(26): Zend_Acl->isAllowed('admin', 'function.fopen', 'index')
My folder is with 755 permissions and i have tried with 777 but i thing the problem is with my ACL.
I need to give some kind of permissions in my ACL ? or i need to give those kind of permissions in de .htaccess ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您在出现错误时“单击”浏览器上显示的链接,或者?您的应用程序尝试打开一个未在您的 acl 中配置的操作“function.fopen”。但这并不重要,该链接会将您发送到 php 文档,与您的应用程序无关。
该错误是权限问题,如果允许您或“服务器”从提供的目录(组/用户)写入/读取,请与您的网络主机联系。
I think you "click" on the Link shown on your Browser when the error appears or? Your Application trys to open an action "function.fopen" wich is not configured in your acl. But thats not important, the link will send you to php documentation and has nothing to do with your application.
The Error is an permission problem, talk to your webhost if you or the "server" is allowed to write/read from the provided directory (group/user).
我遇到了这个问题。
在我的例子中,除了 chmod 777 之外,我还将文件的所有者更改为 Web 服务器用户。
就我而言,我的网络服务器作为守护进程运行。确保将 Web 服务器用户设置为索引目录和目录中索引文件的所有者。
您可以使用 chown 命令更改文件和文件夹的所有者。
您可能必须执行“sudo chown daemon”。我必须在我的 mac 上这样做,因为守护程序用户不是 mac 系统上的实际用户。
I had this problem.
What worked in my case is that, aside from chmod 777, is that I changed the owner of the files to the web server user.
In my case my web server runs as daemon. Make sure that the web server user is set as the owner of the index directory and the index files within the directory.
You can use the chown command to change the owner of the files and the folder.
you might have to do 'sudo chown daemon'. I had to on my mac because the daemon user isn't an actual user on the mac system.