Sponsored Content
Full Discussion: Recursive Permissions???
Top Forums UNIX for Dummies Questions & Answers Recursive Permissions??? Post 302364022 by the_red_dove on Wednesday 21st of October 2009 11:22:51 PM
Old 10-22-2009
Ok, that's new! I'll check it out. Thanks though!
Here's another one, if you don't mind: I logged in as a normal user "ABC" then I did "su" to root. I tried to kill the pid of the user by saying "kill -9 pid-of-ABC" Instead, everything is being killed and I'm going back to the login. Am I killing the entire shell here? How do I avoid that and let the "root" stay logged in??
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

recursive GREP ?

Hi! Suppose I have a directory (no symbolic links) called /WORK that contains 3 subdirectories: /A /B /C My problem is this: I want to look for a file that contains an order number. So far, I obtain what I want by doing this /home/acb% cd /WORK/A /home/acb/WORK/A% grep '093023553' *.*... (3 Replies)
Discussion started by: alan
3 Replies

2. Programming

recursive function

Hi everyone, i need your input on this. We can express a function recursivly like this A(n) = (2 n = 0 5 n = 1 A(n − 1) + A(n − 2) % 47 n > 1 How would i go about constructing a recursive function for this?... (1 Reply)
Discussion started by: bebop1111116
1 Replies

3. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

4. Cybersecurity

Recursive SFTP

Hello, I need to transfer files from Serve1 to Server2. Previously I was using scp command. Now I have to use sftp (due to audit issues). The problem with sftp is (atleast to my level of knowledge) we cannot transfer dirs (and files within that dir). Is there a way to solve this? Looks like... (1 Reply)
Discussion started by: MohanTJ
1 Replies

5. UNIX for Dummies Questions & Answers

Recursive Concatenation

Hi, I have a problem with concatenation text files. I have a directory, say 'foo' Inside this folder, I have many sub folders, say 'oof1, oof2 .... oof20' Each oof directory has a number of text files inside it. I need to concatenate all the text files in oof directories within foo...... (1 Reply)
Discussion started by: Kerensa@unsw.ed
1 Replies

6. UNIX for Dummies Questions & Answers

recursive wc on a directory?

Hi all, I need to count the number of lines in all the files under a directory (several levels deep). I am feeling extremely dumb, but I don't know how to do that. Needless to say, I am not a shell script wiz... Any advice? thanks in advance! (13 Replies)
Discussion started by: bimba17
13 Replies

7. Shell Programming and Scripting

Recursive List File Permissions

How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type. All I need is the UID and GID of each of the files. (1 Reply)
Discussion started by: kelseyh
1 Replies

8. Shell Programming and Scripting

Recursive List File Permissions

How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type such as *.log. All I need is the UID and GID of each of the files/folders output to a text file. Any ideas, any help very much apperciated. (1 Reply)
Discussion started by: kelseyh
1 Replies

9. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

10. Shell Programming and Scripting

Help with recursive command

Hi, I need help with recursive function. This is not a part of any homework or classroom related. I am trying to learn unix and working on a question posted on site. basically i have to create a script which does what rm -r does. my code so far: 1 #!/bin/bash 2 3 function recursive... (2 Replies)
Discussion started by: bluebird13
2 Replies
kill(2) 							   System Calls 							   kill(2)

NAME
kill - send a signal to a process or a group of processes SYNOPSIS
#include <sys/types.h> #include <signal.h> int kill(pid_t pid, int sig); DESCRIPTION
The kill() function sends a signal to a process or a group of processes. The process or group of processes to which the signal is to be sent is specified by pid. The signal that is to be sent is specified by sig and is either one from the list given in signal (see sig- nal.h(3HEAD)), or 0. If sig is 0 (the null signal), error checking is performed but no signal is actually sent. This can be used to check the validity of pid. The real or effective user ID of the sending process must match the real or saved (from one of functions in the exec(2) family) user ID of the receiving process, unless the privilege {PRIV_PROC_OWNER} is asserted in the effective set of the sending process (see Intro(2)), or sig is SIGCONT and the sending process has the same session ID as the receiving process. A process needs the basic privilege {PRIV_PROC_SESSION} to send signals to a process with a different session ID. See privileges(5). If pid is greater than 0, sig will be sent to the process whose process ID is equal to pid. If pid is negative but not (pid_t)-1, sig will be sent to all processes whose process group ID is equal to the absolute value of pid and for which the process has permission to send a signal. If pid is 0, sig will be sent to all processes excluding special processes (see Intro(2)) whose process group ID is equal to the process group ID of the sender. If pid is (pid_t)-1 and the {PRIV_PROC_OWNER} privilege is not asserted in the effective set of the sending process, sig will be sent to all processes excluding special processes whose real user ID is equal to the effective user ID of the sender. If pid is (pid_t)-1 and the {PRIV_PROC_OWNER} privilege is asserted in the effective set of the sending process, sig will be sent to all processes excluding special processes. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, no signal is sent, and errno is set to indicate the error. ERRORS
The kill() function will fail if: EINVAL The sig argument is not a valid signal number. EPERM The sig argument is SIGKILL and the pid argument is (pid_t)-1 (that is, the calling process does not have permission to send the signal to any of the processes specified by pid). The effective user of the calling process does not match the real or saved user and the calling process does not have the {PRIV_PROC_OWNER} privilege asserted in the effective set, and the calling process either is not sending SIGCONT to a process that shares the same session ID or does not have the {PRIV_PROC_SESSION} privilege asserted and is trying to send a signal to a process with a different session ID. ESRCH No process or process group can be found corresponding to that specified by pid. USAGE
The sigsend(2) function provides a more versatile way to send signals to processes. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
kill(1), Intro(2), exec(2), getpid(2), getsid(2), setpgrp(2), sigaction(2), sigsend(2), signal(3C), signal.h(3HEAD), attributes(5), privi- leges(5), standards(5) SunOS 5.11 22 Mar 2004 kill(2)
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy