PHP is_visible()在可读的samba目录上失败 [英] PHP is_readable() fails on readable samba directory

查看:162
本文介绍了PHP is_visible()在可读的samba目录上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在命令提示符下可读的目录上,对PHP的is_visible()函数的调用返回false.我已将权限更改为大多数允许,但仍然没有运气.

Calls to PHP's is_readable() function are returning false on a directory that is readable from the command prompt. I have changed permissions to most-permissible and still no luck.

ls -lad /remote/samba_share
drwxrwxr-x 13 me users 0 May 29 15:49 /remote/samba_share

ls -la /remote/samba_share
drwxr-xr-x  4 me users 0 May  8 14:19 /remote/samba_share/local_dir
drwxr-xr-x 16 me users 0 May 14 19:49 /remote/samba_share/second_drive
drwxrwxrwx 12 me users 0 May 30 09:42 /remote/samba_share/ext_raid

运行以下代码...

if (is_readable('/remote/samba_share'              )){ echo "share ok\n";  } else { echo "share BAD\n";  }
if (is_readable('/remote/samba_share/local_dir'    )){ echo "local ok\n";  } else { echo "local BAD\n";  }
if (is_readable('/remote/samba_share/second_drive' )){ echo "second ok\n"; } else { echo "second BAD\n"; }
if (is_readable('/remote/samba_share/ext_raid'     )){ echo "raid ok\n";   } else { echo "raid BAD\n";   }

...导致...

share ok
local ok
second BAD
raid BAD

samba共享下不在物理主分区上的任何目录似乎都失败了.

Any directory under the samba share that is not on the physical primary partition seems to fail.

配置is_可读()的机器的配置详细信息:

Config details of machine where is_readable() is called:

php -v
PHP 5.3.11-pl0-gentoo (cli) (built: May  5 2012 16:48:35)

php.ini:
    safe_mode = Off
    safe_mode_gid = On # (tried either way, shouldn't matter)
    ;open_basedir =

/etc/fstab entry:
    //remote_machine/samba_share /remote/samba_share cifs iocharset=utf8,credentials=/blahblah/samba_credentials,uid=me,gid=users,file_mode=0777,dir_mode=0777,auto   0 0

eix samba
[I] net-fs/samba
     Installed versions:  3.5.15!t

配置远程计算机的详细信息:

Config details of remote machine:

eix samba
[I] net-fs/samba
     Installed versions:  3.5.15!t

/etc/samba/smb.conf:

    [samba_share]
       path = /samba_share/
       public = yes
       writable = yes
    ;  printable = yes
       browseable = yes
       create mask = 0777
       create mode = 0777
       directory mode = 0777

我已经尽我所能来使此工作正常进行,现在我觉得自己很愚蠢. :-)如果这对任何人都有意义,我也可以提供内核配置.感谢您的帮助!

I have tried everything I can think of to get this working, and now I feel dumb. :-) I can provide kernel config too if that seems relevant to anyone. THANKS for any help!

推荐答案

我没有找到简单的答案,所以我创建了一个新的

I didn't find a simple answer for this, so I created a new PHP bug ticket to track down the problem better. Thanks for all the input!

这篇关于PHP is_visible()在可读的samba目录上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆