Samba share windows folder permissions


Occasional Visitor
I'm still using 270.26 merlin's firmware (due to wireless drivers). I recently connected an ext3 4TB Samsung drive (Seagate enclosed) and transfered my entware system, everything went smoothly.

What was different though is that previously I was using a WD NTFS drive and creating folders though samba in windows was producing folders with 777 rights and root ownership. This is not now the case with ext3. Creating folders produces the 777 rights correctly in folders (force directory mode = 0777, force create mode = 0777 do exist in my smb.conf) BUT the owner/group of the folders is "nobody".

If I use winscp to create folders, they are created normally with user "admin" and group "root". How can I configure smb.conf to use the admin account or is there any other way to automatically create folders through samba with user admin?

PS. "Share with account" is disabled in router's samba web ui. I have an RT-N66U.
Last edited:


Occasional Visitor
No replies...

Let me post the default and generic /etc/smb.conf used by the router when "Share with account" is disabled.

workgroup = WORKGROUP
netbios name = Asus
server string = Asus
unix charset = UTF8
display charset = UTF8
log file = /var/log.samba
log level = 0
max log size = 5
security = SHARE
guest only = yes
encrypt passwords = yes
pam password change = no
null passwords = yes
force directory mode = 0777
force create mode = 0777
max connections = 5
obey pam restrictions = no
use spne go = no
client use spnego = no
disable spoolss = yes
host msdfs = no
strict allocate = No
bind interfaces only = yes
interfaces = lo br0
use sendfile = no
map archive = no
map hidden = no
map read only = no
map system = no
store dos attributes = yes
dos filemode = yes
dos filetimes = yes
dos filetime resolution = yes
comment = WD My Book 1140's Movies
path = /tmp/mnt/Movies
writeable = yes
comment = Samsung D3 Station's Samsung
path = /tmp/mnt/Samsung
writeable = yes

force user = admin

I've added the last 2 lines myself using /jffs/smb.conf.add. However the folder ownership is still user:nobody group:nobody when creating new folders through the smb share. What else can I try?


Part of the Furniture
First....the smb.conf.add needs to be in /jffs/configs not /jffs (I'm assuming you just made a typo).

Second, I'm not sure you can have 2 sections with the same name [global]. I'd try the following as /jffs/scripts/smb.postconf (make sure you set it to executable)

source /usr/sbin/
pc_insert "workgroup = WORKGROUP"  "force user = admin" $CONFIG

which will insert the 'force user' into the main [global] section


Occasional Visitor
Yes it was a typo. However I don't think postconf is supported in 270.26. I quote the wiki:
"Since some of these entries require dynamic parameters, you might be better using the postconf scripts added in 374.36".

My 270.26 is, I think, earlier than 374.36. So I guess I'm stuck at this...

2 questions though:
1. Is there a problem having folders created with "nobody" instead of "admin" when copying or moving files around using the samba share?
2. What if I add the command to the share section, for example [Movies] of smb.conf? Does it work having 2 sections of [Movies]?


Part of the Furniture
Sorry I missed the are correct about postconf not being available.

What about just using a full override smb.conf by copying and then editing the /etc/smb.conf into /jffs/configs. At least it might tell you if you are on the right track.


Occasional Visitor
Seems that they stick in /etc/smb.conf. I will try to reboot when I get home and see if it's still there. Will report back.

It does stick after reboot! Thanks for the help!
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!