Solved

Users problem in Samba Server

Posted on 1998-12-03
7
276 Views
Last Modified: 2010-04-20
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?
0
Comment
Question by:crojas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 2

Expert Comment

by:Neogenix
ID: 1638710
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.
0
 
LVL 1

Author Comment

by:crojas
ID: 1638711
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.
0
 
LVL 2

Expert Comment

by:vx
ID: 1638712
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:crojas
ID: 1638713
It's supossed that that line goes in the directory definition, but it doesn't work, that's my problem
0
 
LVL 2

Expert Comment

by:vx
ID: 1638714
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.
0
 
LVL 1

Expert Comment

by:zblaxell
ID: 1638715
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.
0
 

Accepted Solution

by:
rsurratt earned 100 total points
ID: 1638716
i had same problem.

put the following three lines in /etc/rc.d/rc.local (script executed last at bootup).

umask 000
mount /dev/hda6/bkup
umask 002

all directories and files are accessible by anyone on partition hda6.  umask is returned to 002 for security after that.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question