php - 某些 PHP 函数无法在映射的网络驱动器上正常工作

标签 php ubuntu file-permissions network-drive

我通过添加命令在 Ubuntu 上安装了网络驱动器(运行 Windows Server 2008)

//10.10.101.54/docflow /opt/lampp/htdocs/mount cifs user=administrator,password=wbaZaja43ik,rwx,user,auto,file_mode=6777,dir_mode=6777,uid=1000,gid=1000

/etc/fstab 中,但在该映射驱动器上的文件和目录上使用 PHP 函数 is_file()is_dir() 时遇到问题。当对现有文件或目录调用时,这些函数都会返回 FALSE - 由 file_exists() 函数检查正确的路径,该函数可以正常工作。 PHP 在“管理员”用户下运行,并拥有操作所需的所有权限。

知道如何解决这个问题吗?

谢谢!

最佳答案

引自 gmail dot com 的 digitalaudiorock comments在 PHP 手册中:

Just a note for anyone who encounters is_dir() returning false on CIFS mount points or directories within those mount points on 2.6.31 and newer kernels: Apparently in new kernels they've started using the CIFS serverino option by default. With Windows shares this causes huge inode numbers and which apparently can cause is_dir() to return false. Adding the noserverino option to the CIFS mount will prevent this. This may only occur on 32 systems but I don't have a 64 bit install to test against.

关于php - 某些 PHP 函数无法在映射的网络驱动器上正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10440920/

相关文章:

php - IE9 中 jQuery 表单插件没有 JSON 响应

java - 重新启动 Unix 服务

ruby-on-rails - 每当用户隐含为应用程序名称时,Rails

python - "Permission Denied"试图在 Windows 10 上运行 Python

php - CentOS Apache 无法访问主目录中的文件

php - 通过 Web 服务器 bash 脚本执行 rsync 不起作用

php - 如何让 php 页面返回 503 错误(或任何非 200 错误)

google-app-engine - 为什么我不能 `sudo apt-get update && sudo apt-get install google-cloud-sdk` ?

Android API below 19 等效于 ContentResolver takePersistableUriPermission

php - 在 select for MYSQL 中选择