11-09-2011
It's not a file option. It's a file system option, which applies to any file in the entire partition.
10 More Discussions You Might Find Interesting
1. Cybersecurity
I would like to give execution rights for a script to one user. (that's the easy part...)
When that user is running the script, I would like the effective user ID to be that of the file-owner. Is this possible? (6 Replies)
Discussion started by: hilmel
6 Replies
2. Shell Programming and Scripting
Is there a way to change a process owned by root to be owned by another user. I am interested in finding out if there is a way to put a script in /etc/rc2.d that will start up automatically on reboot that will not be owned by root
This is for security reasons.. The Service that runs on my server... (7 Replies)
Discussion started by: chipmunken
7 Replies
3. Shell Programming and Scripting
Below is my script that is using to rename the name of file .Here I am using two methods to pass the both arguments wih script name or run the script and give the input one by one.But my issue is I want to rename the name of the file if user select Y(y) then it should rename the file else select... (4 Replies)
Discussion started by: anuragpgtgerman
4 Replies
4. Shell Programming and Scripting
I have the following bash script lines in a file named test.sh.
#!/bin/bash
#
# Write Date to cron.log
#
echo "Begin SSI Load $(date +%d%b%y_%T)"
#
# Get the latest rates file for processing.
#
d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1)
filename=$d
export filename... (3 Replies)
Discussion started by: ginowms
3 Replies
5. HP-UX
Hi all,
I know this issues has been discussed multiple times, i have gone through many such discussion but unfortunately i am still not able to solve the issue being faced.
I have configured the sendmail.cf with the smtp host name (Editing the entry starting with DS...)
Post that restarted... (7 Replies)
Discussion started by: chpsam
7 Replies
6. UNIX for Dummies Questions & Answers
i feel weird with this 2 command
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec rm -f {}\;
find /tmp/*test* -user `whoami` -mtime +1 -type f -exec ls -lrt {}\;
the first one return correct which only delete those filename that consist *test* where second command it listed all the... (12 Replies)
Discussion started by: lsy
12 Replies
7. UNIX for Dummies Questions & Answers
I need some help on solaris, setting java path:
$ PATH=/var/tmp/jdk1.5.0_22/jre/bin
$ export PATH
$ java -version
I got the correct version for the application to run, which is:
java version "1.5.0_22"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
Java... (7 Replies)
Discussion started by: fretagi
7 Replies
8. Shell Programming and Scripting
Hi folks,
is there any recommendation, especially from a point of performance, about where to place a user-defined function in awk, like in BEGIN{} or if it is only need once at the end in END{}? Or doesn't it matter at all since, awk is so clever and only interprets it once, wherever it is... (3 Replies)
Discussion started by: zaxxon
3 Replies
9. UNIX for Advanced & Expert Users
Hello All,
Was recently working on an requirement where we have to search files more than a specific number, following is the example on same.
Let's say file names are test_40000.txt,test_40001.txt and so on till test_99999.txt.
Now requirement was to search from find command only those... (1 Reply)
Discussion started by: RavinderSingh13
1 Replies
10. Programming
I figured it out by now. (0 Replies)
Discussion started by: Ralph
0 Replies
LEARN ABOUT OPENSOLARIS
setreuid
setreuid(2) System Calls setreuid(2)
NAME
setreuid - set real and effective user IDs
SYNOPSIS
#include <unistd.h>
int setreuid(uid_t ruid, uid_t euid);
DESCRIPTION
The setreuid() function is used to set the real and effective user IDs of the calling process. If ruid is -1, the real user ID is not
changed; if euid is -1, the effective user ID is not changed. The real and effective user IDs may be set to different values in the same
call.
If the {PRIV_PROC_SETID} privilege is asserted in the effective set of the calling process, the real user ID and the effective user ID can
be set to any legal value.
If the {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling process, either the real user ID can be set to the
effective user ID, or the effective user ID can either be set to the saved set-user ID from execve() (seeexec(2)) or the real user ID.
In either case, if the real user ID is being changed (that is, if ruid is not -1), or the effective user ID is being changed to a value
not equal to the real user ID, the saved set-user ID is set equal to the new effective user ID.
All privileges are required to change to uid 0.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, errno is set to indicate the error, and neither of the user IDs will
be changed.
ERRORS
The setreuid() function will fail if:
EINVAL The value of ruid or euid is less than 0 or greater than UID_MAX (defined in <limits.h>).
EPERM The {PRIV_PROC_SETID} privilege is not asserted in the effective set of the calling processes and a change was specified other
than changing the real user ID to the effective user ID, or changing the effective user ID to the real user ID or the saved set-
user ID. See privileges(5) for additional restrictions which apply when changing to UID 0.
USAGE
If a set-user-ID process sets its effective user ID to its real user ID, it can still set its effective user ID back to the saved set-user
ID.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
exec(2), getuid(2), setregid(2), setuid(2), attributes(5), privileges(5), standards(5)
SunOS 5.11 22 Mar 2004 setreuid(2)