I have CIFS share from EMC storage which is mounted on Linux and also on other windows & mac machines.

At Linux server, CIFS share mounted with mount.cifs. My linux server has php code running on it. The php code can create files and folder.

At the same time, from another windows & mac machine my users tries to add files & folder on to it.

Problem: The files & folders created by windows machine is unreadable by php.

I have tried much research on it and couldn't find solution for the same. I suspected problem with cifs-utils package on linux, so I had upgraded cifs-utils package but it didn't solve my problem.

My server info: centos 6.6 uname -a 2.6.32-431.3.1.el6.i686 #1 SMP Fri Jan 3 18:53:30 UTC 2014 i686 i686 i386 GNU/Linux

mount command on linux: mount -t cifs -o username=administrator,password=password,rw,file_mode=0777,dir_mode=0777 // /userworksp

Any suggestions highly appreciated.

  • mount.cifs -V mount.cifs version: 5.9 – user140157 May 27 '15 at 13:01
  • rpm -qa | grep cifs-utils cifs-utils-5.9-93.3.i686 – user140157 May 27 '15 at 13:01

Check the permissions of the files created from the Windows side (check as seen from Linux so you can see what your PHP code is working with). It may be that the user/group that the files are being created under are restrictive or simply not mapped properly such that the php files do not have access.

  • When windows users adds files to cifs share it shows full permissions. – user140157 May 28 '15 at 6:53
  • ownership root:root chmod permissions shows 777, I will believe it is because of cifs mount options (file_mode=0777,dir_mode=0777) – user140157 May 28 '15 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.