Hi all and TIA for the assistance!

I have an Ubuntu 11.04 server running samba (cifs) with several shares. After following this Ubuntu community wiki MountWindowsSharesPermanently as well as several forum threads dealing with permissions on samba shares, there is something not going correctly. That is, I am doing something wrong.

On shares that are owned by "nobody:nogroup" and supposedly rw, I can mount the shares as read in a laptop running Ubuntu 11.04, but immediately following the creation of any folder or file, that folder or file is locked and I can no longer make any changes to the folder or file. I also have shares that are owned by specific users that I can't mount at all.

These are the users/groups and directories on the remote server:
Code:

root@SambaServer:~# ls -al /srv/SambaShares/NetUsers
total 24
drwxrwxrwx 6 root      users     4096 2012-01-18 08:20 .
drwxr-xr-x 4 root      root      4096 2012-01-18 08:21 ..
drwxrwxrwx 2 user3   user3   4096 2012-01-13 22:58 User3
drwxrwxrwx 2 user2 user2 4096 2012-01-13 22:58 User2
drwxrwxrwx 5 user1      user1      4096 2012-04-27 12:56 User1
drwxrwxrwx 3 user4   user4   4096 2012-03-16 16:13 User4

root@SambaServer:~# ls -al /srv/SambaShares/MultiMedia
total 64
drwxrwxrwx    7 root   nogroup  4096 2012-11-26 12:04 .
drwxr-xr-x    4 root   root     4096 2012-01-18 08:21 ..
drwxrwxrwx   10 nobody nogroup  4096 2012-11-26 10:12 Movies
drwxrwxrwx 1337 nobody nogroup 40960 2012-11-16 20:36 Music
drwxrwxrwx    7 nobody nogroup  4096 2012-11-17 05:29 Pictures
drwxrwxrwx    2 nobody nogroup  4096 2012-04-27 14:19 Playlists
drwxrwxrwx    4 nobody nogroup  4096 2012-04-27 14:51 Podcasts

root@SambaServer:~# cat /etc/passwd | grep 100
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
user1:x:1000:1000:,,,:/home/user1:/bin/bash
user4:x:1001:1001:,,,:/home/user4:/bin/bash
user3:x:1002:1002:,,,:/home/user3:/bin/bash
user2:x:1003:1003:,,,:/home/user2:/bin/bash

root@SambaServer:~# cat /etc/group | grep 100
users:x:100:user2,user1,user4,user3
user1:x:1000:
user4:x:1001:
user3:x:1002:
user2:x:1003:
In /usr/bin I have a file that is invoked on my Ubuntu laptop at login that runs these mount commands:
Code:

user1@MyD0j0:~$ cat /usr/bin/mountsambashares
#!/bin/bash
sleep 30
mount -t cifs //SambaServer/MovieD0j0  /mnt/MovieD0j0 -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
mount -t cifs //SambaServer/PictureD0j0  /mnt/PictureD0j0 -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
mount -t cifs //SambaServer/MusicD0j0  /mnt/MusicD0j0 -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
mount -t cifs //SambaServer/User1 /mnt/User1 -o user=user1,password=user1passwd,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
A few things to note:


  • I use soft links from /home/user1 to the /mnt/<directory> locations.
  • user1 has the same user id and group id on both machines, being the first user added to either.
  • These shares will also be used with 2 Windows machines and a Mac.



Once again, thanks for the assistance and happy computing!

MyD0j0