Solved Can't write to Samba 3.6 share on FreeBSD from Win7

Total newbie to Samba and FreeBSD here.

So I have a user on my FreeBSD machine, griffinhart.

And I have a group, admin.

I have successfully added griffinhart to the admin group:

Code:
griffinhart@hauteclere ~
$ pw groupshow admin
admin:*:1003:griffinhart

In my smb.conf, I have the following:

Code:
[public]
  comment = Public Stuff
  path = /tank/home/public
  public = yes
  writable = no
  printable = no
  write list = @admin

I can connect to the public share just fine from my Windows 7 machine (curiously, I can connect as griffinhart even if I use an entirely wrong password; I assume that's a consequence of the public = yes setting). I can also read files in it. However, I can't write to the share.

What am I doing wrong? Help would be appreciated.
 
Check and see who owns the directories: ls -lah /tank/home/ and ls -lah /tank/home/public/. It is likely that you need to do a chown -R griffinhart /tank/home/. Also, you might need to create a Samba user. Samba has a seperate user lists from the system users, though I'm not 100% sure why it is implemented this way. smbpasswd -a griffinhart and enter a password.

Here is my smb.conf for good measure.

Code:
[data]
path = /tank/data
available = yes
valid users = re
read only = no
browseable = yes
public = yes
writable = yes
 
ls -lah /tank/home/:
Code:
griffinhart@hauteclere ~
$ ls -lah /tank/home/
total 36
drwxr-xr-x  3 root  wheel  3B Dec 28 14:18 ./
drwxr-xr-x  3 root  wheel  3B Dec 28 14:17 ../
drwxr-xr-x  7 root  wheel  7B Dec 28 14:25 public/

ls -lah /tank/home/public/:
Code:
griffinhart@hauteclere ~
$ ls -lah /tank/home/public/
total 84
drwxr-xr-x  7 root  wheel  7B Dec 28 14:25 ./
drwxr-xr-x  3 root  wheel  3B Dec 28 14:18 ../
drwxr-xr-x  3 root  wheel  3B May  6  2013 a/
drwxr-xr-x  12 root  wheel  19B Dec 28 04:33 b/
drwxr-xr-x  10 root  wheel  10B May  6  2013 c/
drwxr-xr-x  3 root  wheel  3B May  7  2013 d/
drwxr-xr-x  6 root  wheel  6B Dec 28 05:05 e/

I've also already done smbpasswd -a griffinhart and that hasn't gotten me write permissions either.
Code:
griffinhart@hauteclere ~
$ su -m root -c 'smbpasswd -a griffinhart'
Password:
New SMB password:
Retype new SMB password:

I noticed that when I'm mapping the network drive on Win7, at the credentials phase, I have a domain set (matching the name of my Win7 machine). Could that have something to do with this problem? I don't see any way to change my domain, though.
 
Everything you've shown is only writable by root. Try either changing the owner chown -R griffinhart <directory> or changing the group chgrp -R admin <directory>; chmod -R g+w <directory>.
 
Ya, you need to change the owner or group of the folders you're trying to access so your user account can make changes. The post above this one details how to do that. Additionally, you need to change the
writable = no
to
writable = yes
in your smb.conf. Compare and contrast your smb.conf and mine from several posts up.
 
e: I'm a colossal idiot. I was testing writing in the directory itself, not the subdirectories - which is to say, I gave group write permissions to all the subdirs, but not the directory itself.

Things work now.

-----

Nope, still no dice.

/usr/local/etc/smb.conf:
Code:
# A publicly accessible directory, but read only, except for people in
# the "admin" group
[public]
  comment = Public Stuff
  path = /tank/home/public
  public = yes
  writable = yes
  printable = no
  write list = @admin

ls -lah /tank/home/public:
Code:
griffinhart@hauteclere ~
$ ls -lah /tank/home/public
total 84
drwxr-xr-x  7 root  admin  7B Dec 28 14:25 ./
drwxr-xr-x  4 root  admin  4B Dec 28 12:37 ../
drwxrwxr-x  3 root  admin  3B May  6  2013 a/
drwxrwxr-x  12 root  admin  19B Dec 28 04:33 b/
drwxrwxr-x  10 root  admin  10B May  6  2013 c/
drwxrwxr-x  3 root  admin  3B Dec 28 14:16 d/
drwxrwxr-x  6 root  admin  6B Dec 28 05:05 e/
 
Back
Top