Reputation: 99
I mounted network drive (running Windows Server 2008) on Ubuntu by adding command
//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
in /etc/fstab
but have troubles using PHP functions is_file()
or is_dir()
on files and directories on that mapped drive. These functions both return FALSE when called on existing files or directories - correct paths checked by file_exists()
function which works correctly. PHP is running under 'administrator' user and have all privileges needed for manipulation.
Any idea how to solve this?
Thanks!
Upvotes: 2
Views: 657
Reputation: 212452
Quoting from digitalaudiorock at gmail dot com's comments in the php manual:
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.
Upvotes: 2