user can't write on cifs share but OK with Windows Explorer

Share ServerA
==== The Samba server is running on Samba version 3.0.22 based HP CIFS Server A.02.03.04
/opt/cifsclient/sbin/cifsclientd version: HP CIFS Client - Version A.02.02.02 smb file: [global]
My previous casw was thew user wasn't able to write to the share from Windows Explorer. After giving the permissions 777 on the share, it FIXED the problem with WRITE permission.
ServerB
Now the problem is with the access and write to the share at UNIX level from remote mounpoint. i create direcotry for mounpoint on serverB and run command as follow:
#mkdir /export/cartsshare/cartstage
#cifsmount //onottaafccifs/carts /export/cartsshare/cartstage -U dbashare -P password -s (run as root)
----
permission before mounting:
drwxrwxr-x 2 cartsprd oradba 96 Feb 10 14:10 cartstage
Now
su - user that want to access the share. This user is already part of oradba group.
cd /export/cartsshare/cartstage
sh: /export/cartsshare/cartstage: Permission denied.
---
permission after mounted:
drwxrwxrwx 2 root sys 131072 Feb 10 14:23 cartstage
How comes that the ownership has changed after mounting. why the user can't write to this file system>

Permission before mounting the share is the permissions and ownership for the local directory (which you use for mountpoint) and permissions after mounting, is the permissions for the filesystem mounted, since it overlays the mountpoint.

Think of it like this (not a perfect analogy but the reason why it happens could be a little more clear)

Assume you are root:

mkdir /newdir
chown devuser:developer /newdir
touch /newdir/file1
touch /newdir/file2
ls /newdir
file1 file2

so far are we good ? Then mount a filesystem on this /newdir mount point:

mount /dev/vg00/lvol15 /newdir
ls /newdir

do you still see file1 and file2 ?
No !
They are still on the disk, but overlayed by the new filesystem. And the ownership and permissions of the /newdir has been converted to those of the lvol15, from the previous mount time of this volume.

Makes sense ?

Why can't the users write on it ? Samba (a.k.a. CIFS) is a strange animal when it comes to unix permissions vs Samba permissions and I do not have enough expertise on Samba side. But I know for a fact that 777 permissions on UNIX level means nothing if Samba permissions (usually set by an AD or LDAP server) are not set for the user to write to this directory level.

Good luck.