Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

[blog]
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
share|improve this question

3 Answers 3

I fixed it by removing inherit permissions and restarting Samba.

share|improve this answer
    
Not sure why this got a downvote. It's the correct solution. –  Lester Peabody Mar 4 '12 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.

share|improve this answer
    
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. –  Lester Peabody Mar 4 '12 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:

[share]
create mask = 0644
directory mask = 0755

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

share|improve this answer

Your Answer

 
discard

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.