Samba share browsable, but cant open files.

I'm trying to configure my first samba share. So far I can browse files, create folders and create "empty" files.

I cant open files, I cant copy over files and I cant copy files from the samba share. This happens with both Ubuntu(Nautilus) and Windows 7.
My smb.conf looks like this:
Code:
[global]
	server string = Samba Server
	log file = /var/log/samba/log.%m
	max log size = 50
	min receivefile size = 131072
	socket options = TCP_NODELAY SO_SNDBUF=65536 SO_RCVBUF=65536
	dns proxy = No
	aio read size = 1
	aio write size = 1
	use sendfile = Yes

[smil]
	path = /home/olav
	valid users = olav
	admin users = olav
	write list = olav
	read only = No
	map readonly = no

What am I doing wrong?
 
A few things to check....

Did you add a Samba account for the user with smbpasswd? If not, do the following as root...

Code:
smbpasswd -a olav

Make the password the same as the FreeBSD login password (for convenience).

You also didn't set security level in your Global section of the smb.conf file. Add the following (considering it seems you want user level security)....

Code:
security = user

That might fix your problem. (Also make sure the user olav owns the directory /home/olav)


You might also want to add something like the following to the share config part of your smb.conf file...

Code:
 writable = Yes
 available = Yes
 create mode = 0644
 directory mode = 0754

The "mode" statement will keep your newly created files from being tagged executable. You can adjust to your liking.

Good Luck.
 
Oh yeah....

I forgot to mention that you need to restart Samba every time you make a change to the smb.conf file. You can do that without a reboot by executing the following as root....

Code:
/usr/local/etc/rc.d/samba restart

It might also be a good idea to add a "workgroup" line to the Global section of your smb.conf file. Make it whatever workgroup name your Windows machines use.

E.g.

Code:
workgroup = Workgroup

Good Luck
 
If possible, use reload instead of restart. Restart will close all active SMB connections, potentially leading to data loss if you have lots of connected clients. :)

For home use, or where you are the only connecting, using restart is safe.
 
I've done all of your suggestions, still no change. Could this be a firewall issue? I've installed ipfw. I've also created a test folder which I chmod 777, cant copy or read from the folder either :(
 
Check the permissions on the box you're connecting to to ensure read capability to the user that samba is using to connect as.
 
Thanks to your great suggestions, I figured it out!

It was the options

aio read size = 1
aio write size = 1

that caused my problems, commenting them out and restarting samba helped.
Samba speed is ok, averaging around 25-30MB/s, full disk speed is 40MB/s.
It is at least a lot faster than NFS, getting just 10MB/s there. File system is ZFS.
 
Back
Top