I created a Samba share on my Ubuntu virtual machine and mounted the share on my Windows 7 host using net use W: \\blog.localhost\blog. When editing or creating any file it sets the perms to -rwxr--r--, and it should be setting it to -rw-r--r--. I need it to not set the file to executable for the user. Below is my configuration for the share.

comment = Development files for Wordpress Blog.
browseable = yes
writable = yes
path = /var/www/wordpress
create mask = 0644
force create mode = 0644
valid users = lpeabody
inherit permissions = yes
force user = lpeabody
force group = www-data

3 Answers 3


I fixed it by removing inherit permissions and restarting Samba.

  • Not sure why this got a downvote. It's the correct solution. Mar 4, 2012 at 18:14

Samba maps the windows system and archive bits to group and user execute. I believe this is done AFTER creation; so the create mask and create mode settings wouldn't help.

Look into the 'map archive', 'map system', and 'map hidden' settings.

  • Sorry I already figured it out... thanks though. I was honestly racking my brain for over an hour, but I guess I just needed to walk away for a while. Mar 4, 2012 at 3:55

For other users with the same problem:

Ensure that you have masks set; if they're missing, they'll often default to include +x. Example:

create mask = 0644
directory mask = 0755

You'll also need to omit inherit permissions, or set it to no.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .