Link to home
Start Free TrialLog in
Avatar of crojas
crojas

asked on

Users problem in Samba Server

I have a Samba Server in Redhat 5.1, when a user create a file, this one has 755 mode. In the smb.conf i have this to be 777, but it doesn't work. I think this must be the umask for every user, but no one has bashrc in their directories.
What happened?
Avatar of Neogenix
Neogenix

On a Unix server, the highest mode you can give a file when it is created is 666.
Your umask value will then be 000.

Good luck.
Avatar of crojas

ASKER

On a Unix server, the highest mode you can give a file when it is created is 777.
rwx = 111b -->7d  
    Your umask value will then be 000.   ----> i know that.

How do i change the umask for every samba user to 000 or 007.
I think I misunderstood your question, but I can always try:
if you access shares on a Samba server, you don't use a shell to login, so .bashrc shouldn't have anything to do with it.
Add a new entry in smb.conf to the [homes] section, or to the section you want to modify:
add: "create mask = 777". It should work, if it doesn't you probably didn't add it to the right section.
Avatar of crojas

ASKER

It's supossed that that line goes in the directory definition, but it doesn't work, that's my problem
The directory section? Do you use Samba 2 or 1.9? Samba 2 is still in development. The (my?) example configuration file lists a line that says "create mask = 777". I believe it should work in for example the [homes] section. I don't know a section called directory, but perhaps I misunderstood you.
You can also put 'create mask = 777' in the top of smb.conf in the global section, where it will affect all shares.

There is a separate 'directory mode' parameter for directories (as opposed to files).

You might have better luck with 'force create mode', or a combination of 'force create mode' and 'create mode'.  The manual states that one is ANDed with the permissions of the file and the other is ORed.  It also implies that there is some DOS -> Unix permissions mapping which might only extend as far as '755' permissions.
ASKER CERTIFIED SOLUTION
Avatar of rsurratt
rsurratt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial