As user1 (primary group root) on server1 (Linux) I am able to write files to /tmp.
The permissions are:
drwxrwxrwt 19 root root 4096 Jan 3 11:04 ./
When I mount (cifs) server1 using usern=user1 on server2 (Linux) I am unable to write any files.
user2@server2$ echo hello >> /mnt/server1/tmp/foo
-bash: /mnt/server2/tmp/foo: Permission denied
However, I am able to write files from a Windows client when I connect with user1!
/etc/samba/smb.conf on server1
[root]
comment = Root
available = yes
path = /
write list = root user1 @root
read only = no
browsable = yes
public = yes
writable = yes
/etc/fstab on server2
//server1/root /mnt/server1 cifs user=user1,password=***,dir_mode=0770,file_mode=0770,nounix ,uid=0,gid=0,forceuid,forcegid
I have tried with/without the uid=0,gid=0,forceuid,forcegid options as well as the mode and nounix options.
From server2I can list files in /mnt/server1/tmp and see files I created locally on server1. I don't see any permissions errors in the logs /var/log/*.
Where/how can I diagnose the issue?
UPDATE
I am able to write to the share from server2 as root. This is really strange as I would think server1 would not trust that root from server2 is the same root on server1.