9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have set below option in following file /etc/inetd.conf in AIX.
ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -u 2
But still it created the file with permission (640):
-rw-r----- 1 ftptosas ftpusrg 6091 Jul 28 12:23 diff_061920.txt
Required permission... (1 Reply)
Discussion started by: mageshpsv01
1 Replies
2. Solaris
Trying to figure out the best method of security for oracle user accounts. In Solaris 10 they are set as regular users but have nologin set forcing the dev's to login as themselves and then su to the oracle users.
In Solaris11 we have the option of making it a role because RBAC is enabled but... (1 Reply)
Discussion started by: os2mac
1 Replies
3. Shell Programming and Scripting
I've got a number of people sending files to me in different directory structures, and users on many different groups who need access to these incoming paths.
My problem is that umask assumes a default of 666 for files. No execute bit, meaning that my users can't even see the incoming folders.... (2 Replies)
Discussion started by: Karunamon
2 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone,
I want to set my properties of my profile to umask 022 by default. I have an idea that i need to make the change in .profile file. Can you please help me, on how would i be able to set it.
Thanks,
Abhishek S. (4 Replies)
Discussion started by: abhisheksunkari
4 Replies
5. AIX
Hi all,
How do i change the default primary group of files uploaded in AIX (via ftp) in such a way that the files will be owned by tom:staff?
I understand that the default file permission can be set in /etc/profile for aix by adding a new line umask=032
Do I add a line in umask as well?... (5 Replies)
Discussion started by: chipahoys
5 Replies
6. Shell Programming and Scripting
dear all,
i'm trying to set the default permission using umask commnd. i'm using bash shell and the permission of the .bash_profile file is
-rwxr-x--- 1 tdmscrdr dba 370 Nov 7 12:21 .bash_profile
but still i'm not able to change the default permissiom.
in the .bash_profile... (1 Reply)
Discussion started by: panknil
1 Replies
7. Linux
I was asked to change the daemon umask on my RHEL4 machine.
so, i changed the /etc/init.d/functions file.
Does this take effect right away? I dont think it does, how can i get it to take affect without rebooting? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
8. AIX
hi, am new to AIX.
i have an issue. iam asked to change the umask setting on a logon script on a server to prevent writable files. i logged in as the root user and typed in umask and it displays 022, which i believe is 755 for direc and 644 for files.
1) how to I identify where the logon script... (2 Replies)
Discussion started by: karthikosu
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
I need to change my umask from 22 to 0022. FreeBSD 5.4 has different way of looking at 22 and 0022. Untill 4.11 stable 022 and 0022 were same. Can anyone help me?
Thanks in advance.
Jimmy (0 Replies)
Discussion started by: jimmynath
0 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.44 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)