Sponsored Content
Operating Systems Linux Red Hat Samba create mask and dir mask on RHEL 4.8 Post 302605987 by maverick_here on Friday 9th of March 2012 09:43:09 AM
Old 03-09-2012
Samba create mask and dir mask on RHEL 4.8

Hi Experts,

I'm using samba -3.6.1 on Red Hat Enterprise Linux ES release 4 (Nahant Update 8) ,all seems ok. The issue im facing is as follows.

When ever a user creates a file via windows explorer the permissions assgined to the file are as follows

Code:
-rw-rwxr--+ 1 tom group2    0 Mar  9 10:02 testfile

drwxrwsr-x+ 2 bob group1 4096 Mar  9 10:38 testdir

Im ok with the directory permissions but would like the file permissions to be 644, following are my smb.conf ( create mask ) details


Code:
create mask = 0644
        force create mode = 0644
        security mask = 0664
        force security mode = 0664
        directory mask = 2775
        force directory mode = 2775
        directory security mask = 2775
        force directory security mode = 2775

Also I have Linux ACL's on the shares for as the requirement called for some complexity so that only a few users in a group have access to the share.Could you experts help me with suitable mask that i need to use in smb,conf and a little explanation would be appreciated.

Thanks in advance
 

10 More Discussions You Might Find Interesting

1. IP Networking

Subnet mask

Hi, I have about 30 computers for users with subnet mask x.x.x.0, and 25 computers for workers with s.m. x.x.x.128. My server has a s.m. x.x.x.128 so with workers computers I can see my server and all the computers in that s.m., but I can't see the server from the users computers and I need to see... (7 Replies)
Discussion started by: Z0DiaC
7 Replies

2. Programming

password mask in C

Hi, Could any one help me to write a C program for password mask with ******. I mean whatever word i will type that will show on the screen as ***** and should store the correct value in a variable. Thanks in advance Krishna (5 Replies)
Discussion started by: krishna
5 Replies

3. IP Networking

Changing the mask

What is the command to change the mask to 255.255.255.0 The system was set up incorectly and the mask needs to be corrected (1 Reply)
Discussion started by: kkinnon
1 Replies

4. Shell Programming and Scripting

mask ID number

HP-UX 11i v2. #!/bin/sh Hi all. I have a flat file like this with lines like this: |07/19/07|08:26AM|1|CupsCoffee|CupsCo|989898989 |Doe, John Y |THE PLUS CARD - Price| | |Y| | 2.00| I would like to replace the id number (field 6) with a masked... (3 Replies)
Discussion started by: lyoncc
3 Replies

5. Shell Programming and Scripting

Need to Mask Data

I have an requirement. There is a file which has the below contents Unix|123|17-01-2010 .... .... .... .... and so an now each letter has a corresponding predefined mapping letter in order to mask the original data.(for example U = A, n=b, i=c, x=d, same like number 1=9,2=8,3=7. Also... (8 Replies)
Discussion started by: ksmbabu
8 Replies

6. UNIX for Dummies Questions & Answers

how to mask the password ?

Hi All, i am executing peoplesoft sqr command from unix prompt which has the unix id/password as parameter along with other parameters. i want to show whole command in log file but want to mask the id/password field. this command i am executing in shell script. Please suggest.. >sqr sqrname... (2 Replies)
Discussion started by: avi.coep
2 Replies

7. Red Hat

What is the use of this [Samba] create mask = 0777 ?

whats the use of this create mask = 0777 wht means mask ? (3 Replies)
Discussion started by: babinlonston
3 Replies

8. Programming

Clip mask on all screen

Hello everyone. I'm programming in C with xlib (standart libs). I need set GC with transparent pixmap (in some pixels). I have colored pixmap, that set tile for GC via XSetTile. This pixmap is painted on all screen. And I have mask, created by this pixmap. This mask is set by XSetClipMask. But... (1 Reply)
Discussion started by: Yuriy
1 Replies

9. UNIX for Dummies Questions & Answers

What is mask and effective right mask in setfacl?

Hi Guys, can someone explain what is mask and effective right mask in setfacl and getfacl command with example, unable to get it. (3 Replies)
Discussion started by: Jcpratap
3 Replies

10. Shell Programming and Scripting

awk help to mask characters

Hi Guys, I'm not an expert so seeking advice on awk. I need to mask numbers in a text field so that they show up as "*" except for the last 4. Input: Desired Output: The part of the Code I am using gives me this Output num=$(echo $num | awk 'BEGIN{FS=OFS=""}{for (i=1 ; i<=NF-4; i++)... (4 Replies)
Discussion started by: aster007
4 Replies
UMASK(2)						     Linux Programmer's Manual							  UMASK(2)

NAME
umask - set file mode creation mask SYNOPSIS
#include <sys/types.h> #include <sys/stat.h> mode_t umask(mode_t mask); DESCRIPTION
umask() sets the calling process's file mode creation mask (umask) to mask & 0777 (i.e., only the file permission bits of mask are used), and returns the previous value of the mask. The umask is used by open(2), mkdir(2), and other system calls that create files to modify the permissions placed on newly created files or directories. Specifically, permissions in the umask are turned off from the mode argument to open(2) and mkdir(2). The constants that should be used to specify mask are described under stat(2). The typical default value for the process umask is S_IWGRP | S_IWOTH (octal 022). In the usual case where the mode argument to open(2) is specified as: S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH (octal 0666) when creating a new file, the permissions on the resulting file will be: S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH (because 0666 & ~022 = 0644; i.e., rw-r--r--). RETURN VALUE
This system call always succeeds and the previous value of the mask is returned. CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001. NOTES
A child process created via fork(2) inherits its parent's umask. The umask is left unchanged by execve(2). The umask setting also affects the permissions assigned to POSIX IPC objects (mq_open(3), sem_open(3), shm_open(3)), FIFOs (mkfifo(3)), and Unix domain sockets (unix(7)) created by the process. The umask does not affect the permissions assigned to System V IPC objects created by the process (using msgget(2), semget(2), shmget(2)). SEE ALSO
chmod(2), mkdir(2), open(2), stat(2) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-01-09 UMASK(2)
All times are GMT -4. The time now is 12:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy