Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I had share a folder from ubuntu 10.04 using "shared option" and samba server and access from windows 7.

When i modify a file in that share folder from windows 7, the file's permission change from 644 to 744 by default, which is quite annoying since they are code to share to others, it better keep the original permissions.

I know i can chmod -R xxx afterward as workaround, but I still hope there's a formal solution to avoid this problem. Thanks for any comments :)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

It strange that it's changing the permission on files that already exist unless Windows is re-creating the files for some reason. You could try adding the following to your smb.conf under the relevant share to force the permissions on anything Windows creates -

create mask = 0644

directory mask = 0755

According to the Samba docs the default is 0744 which matches what is being set on the files you've modified from Windows.

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.