views:

177

answers:

1

Ubuntu server, PHP 5.3, connected via Samba to Windows server share.

I am using file_exists() to check for availability of file on Windows machine. It returns false, although the filepath does exist. Meanwhile, file_get_contents() on the exact same filepath works fine.

I'm wondering if it's a permission issue, since I'm having trouble configuring permissions of the files on the Windows share (it says I don't have permission to change permissions on them). When I look at the permissions through Nautilus, it says the user and group are both root, with 755 rights. I'd like to change the group to www-data, but can't seem to do it.

A: 

It could be directory seperators. Try preg_replace('%(\\|\)%', '/', $path)

celalo
Thanks, but that isn't it. I've actually simplified to try to catch the problem. I created a string with a known working filepath. I'm thinking it has to do with permissions or some sort of symlink.
M3Mania