Solved
I have a multi user system for my roommates and myself that has separate folders for each of us. I've got user authentication working with samba, but unless I set every file and folder readable/writeable by all users, I can't browse it or edit the files.
This isn't ideal as the shares are open to other users access, so I'm hoping there's a way to keep folders at 750 and files at 660 while allowing samba users to browse, delete and edit.
Also, the samba share is actually a mounted NFS share from another server. Both the NFS server and the Samba server have the same users/uid's. When a file is created from a Windows host via the Samba client, the NFS server's permissions
do show that the correct user owns the files, but since the files aren't mode 666 but 640 I can't edit or delete the file.
I am using the following smb.conf:
Code:
[global]
workgroup = domain.net
server string = Samba Server Version %v
strict locking = no
netbios name = FILE
security = share
; passdb backend = tdbsam
local master = yes
os level = 999
preferred master = yes
; map archive = no
; map hidden = no
; map read only = no
; map system = no
encrypt passwords = yes
; guest ok = yes
guest account = nobody
; store dos attributes = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=49152 SO_SNDBUF=49152 SO_KEEPALIVE
deadtime = 15
invalid users = root
strict sync = no
sync always = no
; syslog = 1
; syslog only = yes
#============================ Share Definitions ==============================
;[homes]
; comment = Home Directories
; browseable = no
; writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
;[printers]
; comment = All Printers
; path = /var/spool/samba
; browseable = no
; guest ok = no
; writable = No
; printable = yes
# Un-comment the following and create the netlogon directory for Domain Logons:
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share.
# The default is to use the user's home directory:
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
# A publicly accessible directory that is read only, except for users in the
# "staff" group (which have write permissions):
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
[share]
path = /mnt/share/
read only = no
; browseable = yes
guest ok = yes
guest only = yes
force group = share
force user = share
create mask = 666
directory mask = 0777
hosts allow = 10.0.2.0/24 10.0.10.0/24
[user]
path = /mnt/users/ben
read only = no
; browseable = yes
valid users = ben
hosts allow = 10.0.2.0/24
guest ok = no
create mask = 666
directory mask = 0777
[user1]
path = /mnt/users/bhasani
read only = no
; browseable = yes
valid users = bhasani
guest ok = no
[user2]
path = /mnt/users/khasani
read only = no
; browseable = yes
valid users = khasani
guest ok = no