Sponsored Content
Full Discussion: Finding the Group Owner Name
Top Forums UNIX for Dummies Questions & Answers Finding the Group Owner Name Post 302728947 by Yoda on Thursday 8th of November 2012 06:03:43 PM
Old 11-08-2012
You can also run the command: groups to see which groups you belong to. It will list the primary group first followed by other:-
Code:
groups

This User Gave Thanks to Yoda For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

owner and group in Linux

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)
Discussion started by: lapnguyen
1 Replies

2. Shell Programming and Scripting

permission, owner and group

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)
Discussion started by: pascalbout
2 Replies

3. Shell Programming and Scripting

How about finding out all objects by owner

Hi How about finding out all objects 1. owned by a particular owner / 2. or accessed by group id Thanks in advance Regards, HAA (3 Replies)
Discussion started by: HAA
3 Replies

4. UNIX for Dummies Questions & Answers

How to copy owner permissions to group

Hi, I need a command or a script to change the group permissions to be the same as the owner permissions for all my files and directories (recursive) any idea ? (4 Replies)
Discussion started by: ynixon
4 Replies

5. Shell Programming and Scripting

automatically change owner and group

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)
Discussion started by: borderblaster
1 Replies

6. UNIX for Dummies Questions & Answers

Setting group and owner with mkdir?

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)
Discussion started by: moose123
1 Replies

7. UNIX for Dummies Questions & Answers

Finding the group owner for a file

How would I find out who the group openers is of a file? For example: > ls -l myfile -rwxr-xr-x 1 myronp hawks 20125 Oct 20 20:50 myfile How do I return just hawks. I could do this with a series of cut or awk, but is there a more direct way. The ls -g is better, but still... (1 Reply)
Discussion started by: Dad4x
1 Replies

8. Emergency UNIX and Linux Support

To identify the group owner

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)
Discussion started by: ggayathri
6 Replies

9. AIX

Files without owner and group

Dears it is normal that the below binaries stay without any owner and group I have checked it in many servers and the like the below /usr/lpp/bos.net/inst_root/etc/ipsec# ls -lrt total 248 -r-xr-xr-x 1 987 987 13589 Jun 29 2005 default_group -r-xr-xr-x ... (5 Replies)
Discussion started by: thecobra151
5 Replies

10. Shell Programming and Scripting

List files whose owner or group is numeric

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
FCHOWN(3P)						     POSIX Programmer's Manual							FCHOWN(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
fchown - change owner and group of a file SYNOPSIS
#include <unistd.h> int fchown(int fildes, uid_t owner, gid_t group); DESCRIPTION
The fchown() function shall be equivalent to chown() except that the file whose owner and group are changed is specified by the file descriptor fildes. RETURN VALUE
Upon successful completion, fchown() shall return 0. Otherwise, it shall return -1 and set errno to indicate the error. ERRORS
The fchown() function shall fail if: EBADF The fildes argument is not an open file descriptor. EPERM The effective user ID does not match the owner of the file or the process does not have appropriate privilege and _POSIX_CHOWN_RESTRICTED indicates that such privilege is required. EROFS The file referred to by fildes resides on a read-only file system. The fchown() function may fail if: EINVAL The owner or group ID is not a value supported by the implementation. The fildes argument refers to a pipe or socket or an fat- tach()-ed STREAM and the implementation disallows execution of fchown() on a pipe. EIO A physical I/O error has occurred. EINTR The fchown() function was interrupted by a signal which was caught. The following sections are informative. EXAMPLES
Changing the Current Owner of a File The following example shows how to change the owner of a file named /home/cnd/mod1 to "jones" and the group to "cnd". The numeric value for the user ID is obtained by extracting the user ID from the user database entry associated with "jones". Similarly, the numeric value for the group ID is obtained by extracting the group ID from the group database entry associated with "cnd". This example assumes the calling program has appropriate privileges. #include <sys/types.h> #include <unistd.h> #include <fcntl.h> #include <pwd.h> #include <grp.h> struct passwd *pwd; struct group *grp; int fildes; ... fildes = open("/home/cnd/mod1", O_RDWR); pwd = getpwnam("jones"); grp = getgrnam("cnd"); fchown(fildes, pwd->pw_uid, grp->gr_gid); APPLICATION USAGE
None. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
chown(), the Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 FCHOWN(3P)
All times are GMT -4. The time now is 01:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy