Solved

Users problem in Samba Server

Posted on 1998-12-03
7
249 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
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP Apache application gives "Forbidden" message 5 45
Shell script to extract rar files in severa directories 7 74
LINUX CENTOS + APACHE 9 62
AD LDAP LDS 3 48
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now