Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just setup a new FreeNAS .7.2 box with two 1TB drives mirrored. Configuration seems solid and I can even browse the SMB shares I created from any computer on the network. However when I try to add a folder or drop a file to be uploaded I get the message that I don't have proper permissions.

I don't want to authenticate users, I want it to be open. I have anonymous authentication setup in the config for the SMB service and the hosts allow and hosts deny field is blank. I even added the ip address of the computer I was trying to upload from to the HOSTS ALLOWED field and I still get the permissions error (I even confirmed the changes). I've changed this to be local user authentication and want to use a global user.

Is there something I'm missing? I can browse the shares fine, but I can't upload or create folders.

I'm not sure if I should make a new post for this or not, but here goes:
I decided to give up on anonymous access. Everything I tried and you guys suggested just didn't work. Also I'm not fond of manually editing the smb.conf because if I do, and then change permissions or users in the webgui, it resets all my manually changed settings.

I went in and set authentication to Local User and created a user for all connecting clients. I put them in the wheel group which has full read, write and execute permissions for the mount point (see screenshot This works on existing shares in the mount. I can view, add folders, add files, etc to all existing shares. Now if I add a new share, I can browse it, but I cant add files or folders. The shares are exactly the same and should have the same permissions. It doesn't make sense to me. Here's the config, the [Backup] share works and I can read, edit, execute. The [Storage] share I can only read.

#max protocol = smb2
encrypt passwords = yes
netbios name = freenas
workgroup = WORKGROUP
server string = FreeNAS Server
security = user
dns proxy = no
# Settings to enhance performance:
use sendfile = yes
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = TCP_NODELAY SO_SNDBUF=64240 SO_RCVBUF=64240 
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = yes
time server = yes
guest account = ftp
display charset = LOCALE
max log size = 10
syslog only = yes
syslog = 1
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
dos charset = CP437
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = tdbsam

comment = Any Backup Files
path = /mnt/mnt1/Backup/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = no
inherit permissions = yes

comment = Storage for Files
path = /mnt/mnt1/Storage/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = no
inherit permissions = yes

If I create any new shares then I only have read access. Like I said it doesn't make sense to me. Any light shed on the subject will be appreciated.

Thanks for all your help by the way. Sorry for shifting gears so quick on this question.

share|improve this question
up vote 1 down vote accepted

When a windows computer connects to a windows server it first tries the currently logged in username with a null password first. If server back end does not recognize the username it will fall back and give you anonymous access.

eg. if bob tries to connect to a network share then windows will first try connecting with the username bob before giving a login box

FreeNAS is based on SAMBA though and it acts a little different. If the user is unknown to the system, the default behavior is to deny access.

So what needs to be done is to mimic this behavior and any connection attempts with a unknown username get anonymous access.

So you will need to modify the SAMBA config to map unknown users (bob) to the nobody account and then create an account called 'nobody' that has no password

This way when bob tries to connect the server does not recognize the username bob so it falls back to anonymous

To map unknown users to the guest account, add this configuration to the globals

    guest account = nobody
    map to guest = bad user

Then Create a User called 'nobody' without a password and you should be able to access the share anonymously.


Also change

   security = user

and make the nobody user by running this command from Shell (via ssh or telnet or something)

User$ smbpasswd -an nobody
share|improve this answer
Hmmm I did exactly what you said. I had to use everyone for my guest account though because nobody was reserved. I edited the post to share my smb.conf. Can you see anything wrong? – drpcken Apr 20 '11 at 2:58
Try this config – Silverfire Apr 20 '11 at 5:06
you can use "nobody" – Matt Apr 20 '11 at 5:21
Ok I added the security = user and now i get prompted for a password each time. – drpcken Apr 20 '11 at 16:28
See edit above please. I ran the smbpasswd command like you said. Edited config to above, still saying permissions needed. – drpcken Apr 20 '11 at 16:50

I did not get to see the original configuration, but have you tried running with security = share and, in the share configuration, guest only = yes? This may cause some problems if you want to have any shares with non-guest access.

Being able to see the relevant snippets of your syslog would be helpful, especially if you increased log level to, say, 3.

On the Windows computer you are using to connect to this server, what is your username? Does that username exist on the FreeNAS box?

share|improve this answer
I will try with guest only = yes. On the windows computer the username is my name, and there is a user on the box for it. Should I delete that user? Thanks! – drpcken Apr 21 '11 at 14:39
I was able to set log level higher and tried accesing the shares again. Found this in log: smbd[6499]: ( connect to service Multimedia initially as user ftp (uid=21, gid=50) (pid 6499). Its trying to connect as ftp user. – drpcken Apr 21 '11 at 14:54
Set the log even higher and tried to create a new folder in the shares, and got this smbd[8766]: open_directory: unable to create New folder. Error was NT_STATUS_ACCESS_DENIED – drpcken Apr 21 '11 at 15:20
If you use security = share, then you don't need to worry about the coincident users. If you use security = user, then they can cause problems, especially if your passwords differ; the man page says, "...the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client." Also, what are the Unix permissions and ownership for the directory underlying the share? Are you using both guest only = yes and guest ok = yes? – justarobert Apr 21 '11 at 17:17
Please log onto the server and run ls -l /mnt/mnt1. I suspect you will find that the permissions on the Backup and Storage directories are different. Newly created directories do not necessarily inherit the permissions of their parents. What web GUI are you using, and how do you create the shares and the underlying directories? If the permissions are the same, do you get any errors in the logs for the Storage failed access? – justarobert Apr 23 '11 at 7:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.