I have a Windows 7 host, with a CentOS 6 guest under VirtualBox.
I have a Windows directory shared with the Linux guest using CIFS.
Everything worked fine so far, until I realized that all chmod
operations yield:
chmod: changing permissions of `x': Operation not permitted
This is understandable, but my problem is that some tools I have no control on, attempt to chmod
files for me, and fail as a result.
Is it possible to allow but ignore all chmod()
calls on a CIFS mount? Please note than these calls are made from a programming language and not from the command-line chmod
utility.
Edit: the manual for mount.cifs says (emphasize mine):
The core CIFS protocol does not provide unix ownership information or mode for files and directories. Because of this, files and directories will generally appear to be owned by whatever values the uid= or gid= options are set, and will have permissions set to the default file_mode and dir_mode for the mount. Attempting to change these values via chmod/chown will return success but have no effect.
That's exactly the behaviour I'm after then, so why is it not working for me?
chmod()
function. @ernie It bails out when the file permissions are (trying to be) modified, and does not complete.chmod()
some files. The exact error is: Extraction from phar "..." failed: Cannot extract "package.xml" to "...", setting file permissions failed.