Problems with Samba and newly created files fixed

For a very long time I've had problems that I couldn't get access to files I had just created on a SMBFS/CIFS mount. The problem was clear:

[silfreed@joshua test]$ ls -ld .drwxrwxrwx 13 nobody nobody 0 Feb 12 09:17 .[silfreed@joshua test]$ touch junktouch: setting times of `junk': Permission denied[silfreed@joshua test]$ ls -l junk-rw-rw-r-- 1 nobody nobody 0 Feb 12 12:58 junk[silfreed@joshua test]$ echo "test" > junkbash: junk: Permission denied

Even though my smb.conf and fstab entries forced each file created to mode 0666 and each directory to 0777, the file didn't get created with the correct permissions. I obviously couldn't change a file that didn't have world-write and was owned by nobody:nobody.

The answer was made clear to me today: make a group that my user is in and mount the share on the file server with that group instead of nobody! Observe:

[silfreed@joshua test]$ ls -ld .drwxrwxr-x 13 nobody edfileserver 0 Feb 12 13:00 .[silfreed@joshua test]$ touch junk[silfreed@joshua test]$ ls -l !$ls -l junk-rw-rw-r-- 1 nobody edfileserver 0 Feb 12 13:02 junk[silfreed@joshua test]$ echo "test" > junk[silfreed@joshua test]$ cat junktest

Ahh! Much better. And no annoying "setting times of `blah`" error messages. Why didn't I see this sooner?

I guess this eliminates my need for NFS on my file server, which I think is very good since the exports file is very evil for doing authenticated access (without kerberos, anyway).