Solved

Users problem in Samba Server

Posted on 1998-12-03
7
284 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
What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

 
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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

617 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