hi guys, I'have a question 4 u.
Why this code give me the right output (an integer on the stdout):
read(fd,&mpid,sizeof(pid_t));
printf("%d\n",mpid);
Instead this code give me only a blank line:
read(fd,&mpid,sizeof(pid_t));
write(STDOUT_FILENO,&mpid,sizeof(pid_t));
... (2 Replies)
Hello mates:
I met problem with using read() & write(). I m trying to use read twice on client first time is the size of buffer, 2nd time is the buffer. I think I have to, coz I dnot know file size. So, I write twice on server as well -- 1st, filesize; 2nd, buffer.
The problem is, sometimes,... (11 Replies)
Folks;
I'd like to create a group on my Linux box & add a few users to it.
Is there a way to do so and restrict this group/users to have access to only one or directory trees?
Let's say i need this group to only have a read write access to only these two directories /opt/Virtu & /fsn/comers
... (10 Replies)
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Hi
want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris.
Purpose : while running perf. test, needs to find where is the bottleneck.
We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Hi All,
I want to configure samba share permission so that only directory creator/owner has a read and write permission and other users should not have any read/write access to that folder.Will that be possible and how can this be achieved within samba configuration.
Regards,
Sahil (1 Reply)
Discussion started by: sahil_shine
1 Replies
LEARN ABOUT DEBIAN
pam_umask
PAM_UMASK(8) Linux-PAM Manual PAM_UMASK(8)NAME
pam_umask - PAM module to set the file mode creation mask
SYNOPSIS
pam_umask.so [debug] [silent] [usergroups] [umask=mask]
DESCRIPTION
pam_umask is a PAM module to set the file mode creation mask of the current environment. The umask affects the default permissions assigned
to newly created files.
The PAM module tries to get the umask value from the following places in the following order:
o umask= argument
o umask= entry of the users GECOS field
o pri= entry of the users GECOS field
o ulimit= entry of the users GECOS field
o UMASK= entry from /etc/default/login
o UMASK entry from /etc/login.defs
OPTIONS
debug
Print debug information.
silent
Don't print informative messages.
usergroups
If the user is not root and the username is the same as primary group name, the umask group bits are set to be the same as owner bits
(examples: 022 -> 002, 077 -> 007).
umask=mask
Sets the calling process's file mode creation mask (umask) to mask & 0777. The value is interpreted as Octal.
MODULE TYPES PROVIDED
Only the session type is provided.
RETURN VALUES
PAM_SUCCESS
The new umask was set successfully.
PAM_SERVICE_ERR
No username was given.
PAM_USER_UNKNOWN
User not known.
EXAMPLES
Add the following line to /etc/pam.d/login to set the user specific umask at login:
session optional pam_umask.so umask=0022
SEE ALSO pam.conf(5), pam.d(5), pam(7)AUTHOR
pam_umask was written by Thorsten Kukuk <kukuk@thkukuk.de>.
Linux-PAM Manual 06/04/2011 PAM_UMASK(8)