I've seen many files have UID of 25 and GID of 987 after the last two AIX upgrades I've done. Since neither that UID nor GID exist on my servers, I've added this as one of my post upgrade steps:
I am bit unclear of how Linux was set in the real world, please advise me how it's supposed to be.
When I log in as root and do a ls -l, I find: /boot, /, /var, /usr, /tmp, /home, /u01, /u02, /u03 and of of this partition is owned by root and the group also belong to root. Is that the way it's... (1 Reply)
hello
I search a script (ksh for Aix 5.3) to save all permissions, groups and owner for all files. Because we work much to change it, and a mystake ......!
So i want execute this script to save/ execute permissions for all files.
If you have this script, thank you for your help ;)
best... (2 Replies)
We have a program that when a new account is created using the webpage it creates a new directory on the linux filesystem for the account. The problem is the process that creates the directory is as root user, as I want ftpuser to be able to login I have to manually login and chown -R the... (1 Reply)
Hi all,
We have some files are under 744 permissions and the the owner is say owner1 and group1.
Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that.
... (14 Replies)
Hello, i would like to find huge files and group them by owners.
To find big files i use this command:
ls -lR | sort -bnr +4 | head -n 75
which give me 75 biggest files, then i need to see in which subdirectory is every file.
second thing i dont know is how to group those files by owner, could... (6 Replies)
Hi,
As root, I want to create a directory and set the group and ownership permissions at the same time with one command, instead of making the directory, then going back and doing a chown and chgrp.
I don't see an option for this in the mkdir man page. Would I pipe chown and chgrp with my... (1 Reply)
If I have to identify the group owner of an AIX group, what is the command to be used. Example: there is an mqadm group, how do I find the owner of this group?
Please help. (6 Replies)
I am searchingfor files owned by particular owner and group in a particular directory including its sub-directories. I use
find <dir> -user <user> -group <group> -exec ls -l {} \;
It does not work completely. In the sense is a subdirectory is owned by 'user' and group 'group' then all... (9 Replies)
I want to add a condition is my find command to include files/sub-directory whose owner or group is all numeric number.
My current find command is
find . \( -user root -o -user soham\) -type f -exec ls -l {} \; 2>&1
---------- Post updated at 10:20 AM ---------- Previous update was at... (5 Replies)
Discussion started by: Soham
5 Replies
LEARN ABOUT SUSE
setresuid
SETRESUID(2) Linux Programmer's Manual SETRESUID(2)NAME
setresuid, setresgid - set real, effective and saved user or group ID
SYNOPSIS
#define _GNU_SOURCE
#include <unistd.h>
int setresuid(uid_t ruid, uid_t euid, uid_t suid);
int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
DESCRIPTION
setresuid() sets the real user ID, the effective user ID, and the saved set-user-ID of the calling process.
Unprivileged user processes may change the real UID, effective UID, and saved set-user-ID, each to one of: the current real UID, the cur-
rent effective UID or the current saved set-user-ID.
Privileged processes (on Linux, those having the CAP_SETUID capability) may set the real UID, effective UID, and saved set-user-ID to arbi-
trary values.
If one of the arguments equals -1, the corresponding value is not changed.
Regardless of what changes are made to the real UID, effective UID, and saved set-user-ID, the file system UID is always set to the same
value as the (possibly new) effective UID.
Completely analogously, setresgid() sets the real GID, effective GID, and saved set-group-ID of the calling process (and always modifies
the file system GID to be the same as the effective GID), with the same restrictions for unprivileged processes.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EAGAIN uid does not match the current UID and this call would bring that user ID over its RLIMIT_NPROC resource limit.
EPERM The calling process is not privileged (did not have the CAP_SETUID capability) and tried to change the IDs to values that are not
permitted.
VERSIONS
These calls are available under Linux since Linux 2.1.44.
CONFORMING TO
These calls are nonstandard; they also appear on HP-UX and some of the BSDs.
NOTES
Under HP-UX and FreeBSD the prototype is found in <unistd.h>. Under Linux the prototype is provided by glibc since version 2.3.2.
SEE ALSO getresuid(2), getuid(2), setfsgid(2), setfsuid(2), setreuid(2), setuid(2), capabilities(7), credentials(7), feature_test_macros(7)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 2007-07-26 SETRESUID(2)