Sponsored Content
Full Discussion: Chgrp and Chown ???
Top Forums UNIX for Dummies Questions & Answers Chgrp and Chown ??? Post 302199901 by skyineyes on Wednesday 28th of May 2008 05:52:44 AM
Old 05-28-2008
Chgrp and Chown ???

Hi

Can anybody please let me know the usage of Chgrp command with an example???

Thanks
 

10 More Discussions You Might Find Interesting

1. AIX

chown

hello chown not change ownership before: 205:system ~kuku chown kuku:system ~kuku after no change 205:system ~kuku aix box can someone help me? ariec (2 Replies)
Discussion started by: ariec
2 Replies

2. Solaris

Owner of file gets 'not owner' error for chgrp

Hi Folks, I know that changing users and groups is pretty basic admin, but this one has got me stumped. When I try to change the group of a file for which I am the owner for, it still gives me a 'Not owner' error. For example, when I am logged in as 'webadmin', I have the following file: ... (4 Replies)
Discussion started by: brizrobbo
4 Replies

3. UNIX for Dummies Questions & Answers

chown

is there a difference in chown on a file or a directory? how do i chown a directory and all the contents? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

4. Shell Programming and Scripting

Chown - error

I have a file fin2009_4.txt.gz in the unix ftp server. Owner of the file is: ftpusr. -rw-r--r-- 1 ftpusr sap 0 Feb 19 10:19 fin2009_4.txt.gz When I try to delete this file after copying to my home folder, I am getting the following error. rm: fin2009_4.txt.gz1: override... (4 Replies)
Discussion started by: sid1982
4 Replies

5. OS X (Apple)

AFP mount + Chown/Chgrp respecting

Hello all... Does anyone know how to make an AFP mount of home directories (/Volumes/users off of another server) so that any users doing an ssh login retain write permission to their individual folders, read-write permissions to folders chowned to appropriate group... and so that newly created... (0 Replies)
Discussion started by: drkdev
0 Replies

6. Solaris

chown

Hello My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into... (3 Replies)
Discussion started by: Street
3 Replies

7. Shell Programming and Scripting

Can't chgrp, chown on Linux

I have a problem on Linux wherein it doesn't allow me to use the chown and chgrp even if I am the owner of the file. Is this one of the Linux limitations? BTW, I can use chmod. (4 Replies)
Discussion started by: Jin_
4 Replies

8. Red Hat

Can't chgrp. Error - chgrp: changing group of `<file>': Invalid argument

I found that I cannot chgrp for some reason with error: chgrp: changing group of `<file>': Invalid argument This happens on all NFS mounted disks on client machines. We use AD (not my call) for authentication and it also provides groups. We have a NFS server running Scientific Linux 6.3... (1 Reply)
Discussion started by: venmx
1 Replies

9. UNIX for Dummies Questions & Answers

Pls help. can't do chown ????

I am trying to change the directory to owner of Sybase. But I get permission denied. I did login as root. newd1> ls -l total 58 drwxr-xr-x 2 prod develop 5 Oct 17 06:51 bin drwxr-xr-x 2 prod develop 7 Oct 17 07:18 etc dr-xr-xr-x 1 root root 1... (15 Replies)
Discussion started by: samnyc
15 Replies

10. Solaris

Chgrp failed on NAS mounted

Hi, I am facing chgrp issue for a directory on a NAS mounted partation. issue details : user1 belongs to two groups grp1(primary) and grp2(secondary) not able to change directory group to secondary. WORKING on /tmp #mkdir /tmp/a #ls -ld /tmp/a drwxr-xr-x 2 user1 grp1 117 Mar 24... (7 Replies)
Discussion started by: naveen.surisett
7 Replies
CHOWN(2)						      BSD System Calls Manual							  CHOWN(2)

NAME
chown, fchown -- change owner and group of a file or link SYNOPSIS
#include <sys/types.h> #include <unistd.h> int chown(const char *path, uid_t owner, gid_t group); int fchown(int fd, uid_t owner, gid_t group); DESCRIPTION
The owner ID and group ID of the file (or link) named by path or referenced by fd is changed as specified by the arguments owner and group. The owner of a file may change the group to a group of which he or she is a member, but the change owner capability is restricted to the super-user. Chown() clears the set-user-id and set-group-id bits on the file to prevent accidental or mischievous creation of set-user-id and set-group- id programs. Fchown() is particularly useful when used in conjunction with the file locking primitives (see flock(2)). One of the owner or group id's may be left unchanged by specifying it as -1. RETURN VALUES
Zero is returned if the operation was successful; -1 is returned if an error occurs, with a more specific error code being placed in the global variable errno. ERRORS
Chown() will fail and the file or link will be unchanged if: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters. [ENOENT] The named file does not exist. [EACCES] Search permission is denied for a component of the path prefix. [ELOOP] Too many symbolic links were encountered in translating the pathname. [EPERM] The effective user ID is not the super-user. [EROFS] The named file resides on a read-only file system. [EFAULT] Path points outside the process's allocated address space. [EIO] An I/O error occurred while reading from or writing to the file system. Fchown() will fail if: [EBADF] fd does not refer to a valid descriptor. [EINVAL] fd refers to a socket, not a file. [EPERM] The effective user ID is not the super-user. [EROFS] The named file resides on a read-only file system. [EIO] An I/O error occurred while reading from or writing to the file system. SEE ALSO
chown(8), chgrp(1), chmod(2), flock(2) STANDARDS
The chown() function is expected to conform to IEEE Std 1003.1-1988 (``POSIX.1''). HISTORY
The fchown() function call appeared in 4.2BSD. The chown() and fchown() functions were changed to follow symbolic links in 4.4BSD. BSD
January 25, 1997 BSD
All times are GMT -4. The time now is 06:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy