I have a user directory mounted to ubuntu 12.04 with cifs. /etc/fstab contains a line;
//cb/share /home/cb cifs user=ubuntu,password=abc123,uid=cb,gid=users 0 0
The share mounts and works fine except for chown/chmod commands, which fail with;
$ sudo touch /home/cb/foo $ sudo chown cb /home/cb/foo chown: changing ownership of `/home/cb/foo': Permission denied
Forget that cifs is squashing uid and gid to the correct values (cb:users) already. There are some pre-existing scripts and utilities I need to use which fail because of the non-zero exit status returned by chown/chmod.
I naively tried mounting elsewhere (/mnt/cb), and then using bindfs to re-mount it, but this didn't work either.
sudo bindfs -o perms=0750,mirror=cb,group=users /mnt/cb /home/cb
Note, the only solution I'm looking for here is some way to configure the server/mount so that chmod/chown will fail quietly - i.e., return zero exit status.