Firstly, massive thanks to dmizer for this incredible guide, there is very little info on the web that pulls everything together like this.
I tried to avoid asking a question, but have been banging my head for weeks now. Mounting shares in Ubuntu has been the single hardest thing I have tried to do, hope someone can help.
I have 2 samba shares running on a 9.10 server, and 2 users that access them, one user can write to both, the other user can write to one and only read from the other.
My smb.conf is as follows (could be correct and the fstab that is causing the problems, not sure):
Code:
[global]
; General server settings
netbios name = SERVER146
server string =
workgroup = WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
[read]
path = /shared/read
browseable = yes
write list = airc
read list = cadet airc
guest ok = no
create mask = 0777
directory mask = 0777
[write]
path = /shared/write
browseable = yes
write list = cadet airc
read list = cadet airc
guest ok = no
create mask = 0777
directory mask = 0777
This has been seup according to the guide here:
http://ubuntuforums.org/showthread.php?t=202605
Only difference is that the shares are symlinks to other directories, hope this doesn't cause issues, haven't thought to test that one!
Now, my fstab on the client PCs, also 9.10, have been setup according to your guide, using the credentials file:
Code:
//server/read /media/read cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
//server/write /media/write cifs credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
This worked fine, but any folders that was created in the writable share, came with a padlock on them. This meant that once a folder was created, it couldn't be edited or written inside.
Looking in the troubleshooting, I added the "nounix" switch to prevent this, which worked a treat! BUT, as a consequence, files copied to the share become corrupted.
What I mean by this, when a spreadsheet for example is copied to the write share and then opened again from the share, it is blank! Opening the same file in Windows shows a corrupted file, with some of the original data there, but very garbled.
Copying the file 4 or 5 times and opening from the share after each one will work sometimes on one of the attempts, bit hit and miss though.
I did also try adding the gid and uid lines in fstab. Finally, I tried the nobrl command in fstab. Same results.
Any help appreciated!
Bookmarks