-   Linux - General (
-   -   creating files from windows on a samba share gives read-only permissions. (

lievendp 12-15-2008 11:10 AM

creating files from windows on a samba share gives read-only permissions.

My samba server is acting weird, the home folders are samba shares on a linux server. They are accessed from windows xp clients.

When a client creates a file (doc, xls, ...) on his homefolder, it gets r--r--r-- rights with the correct ownership <username> usersgroup

When I assume the identity of that user and touch a new file in the directory, I get the normal permissions rw-r--r-- according to my umask settings in the /etc/profile configuration.

I can find no changes to umask anywhere in the bash_profile or /etc/bash.bashrc or bashrc records anywhere system-wide or user-specific.

In the /etc/smb.conf file, I put the following in the homes directive:
create mask 0755
There is already browsable = no; writable = yes for [homes]

In the global part, nothing file-permission related explains this behavior.

Samba was restarted after adding the "create mask 0755" in the config.

Does anybody know where else to look?


Guttorm 12-15-2008 11:34 AM


I have this in my Samba configuration file:

create mask = 0666
directory mask = 0777

So it could be it's just the missing = character. If you want others can read, but only owner can write, it should be:

create mask = 0644
directory mask = 0755

PresGas 12-15-2008 11:41 AM

Depending on how much trafic you get on your samba server, you could modify the "log level" directive in your smb.conf file and have a user create a new file and see what your logs say

log level = 3
should suffice.

I also stumbled on the "force create mode"/"force directory mode". Now, if I were you, I would thoroughly read the smb.conf man pages to see if there are other directives that would be better, but that may be another option.

PresGas 12-15-2008 11:43 AM

Just saw Guttorm's reply right after I posted. I did not see that...duh. You can also run

to make sure your edits are good on your smb.conf file.

lievendp 12-15-2008 12:02 PM

Thank you guys, I will check the things you mention here asap.

lievendp 12-17-2008 11:55 AM

testparm gives an "all-ok" message.

The logging is put on 3 and allready I see things like:

"timeout_processing: End of file from client"

I'll check further what goes into the logs now.


All times are GMT -5. The time now is 03:15 AM.