By default, when mount.cifs is invoked as a non-root user for mounting a share from a non-Samba server, no uid= or gid= option is passed to the kernel, with the result that files are only writable by root on the mount point. The sensible default would be for user mounts to inherit uid= and gid= from the calling user when called as non-root, except when overridden on the commandline. Patch to follow.
Created attachment 2811 [details] Patch for sensible uid= default for mount.cifs This patch ensures that default uid and gid values are passed to the kernel when mount.cifs is invoked by !root.
your logic makes sense - am looking at patch
I don't like the strcpy calls in this patch. Look unsafe to me... Jeremy.
Fixed using a varient of this patch for 3.0.28a and above. Jeremy.