07-04-2011
hmm ok.if you change owner/group a file you must be superuser.chown controls `ran chown which user ID and what is ID of the file owner,
if these equals chown is permitted else not permitted'.
if user ID equals 0,then any chown or chgrp operations is permitted.
for achieve this as normal user,you can use sudo.
10 More Discussions You Might Find Interesting
1. AIX
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
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
Hi
Can anybody please let me know the usage of Chgrp command with an example???
Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies
4. UNIX for Dummies Questions & Answers
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
5. OS X (Apple)
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
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. Red Hat
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
8. UNIX for Dummies Questions & Answers
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
9. Solaris
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
10. Shell Programming and Scripting
I am working on a test machine.
I just discovered that I have misunderstood the way the following command is run.
chown -Rv some_user:users /some_folder/*This command do exactly what I want. Change the owner of every things from the named folder and in all child folders.
But of course it leave... (13 Replies)
Discussion started by: jcdole
13 Replies
chown(1) General Commands Manual chown(1)
NAME
chown - Changes the owner of files or directories
SYNOPSIS
chown [-fhR] owner [:group] file...
The chown command changes the owner of the specified files or directories to the specified user name or user ID.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
chown: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] Turns off error reporting. [Tru64 UNIX] If file is a symbolic link, chown -h file changes the owner of the symbolic link.
The chown file format changes the owner of the file referenced by the symbolic link. Descends recursively through its directory arguments,
setting the specified owner.
OPERANDS
The pathname of the file for which ownership is to be changed. A user ID and optional group ID to be assigned to file. The owner portion
of this operand must be a user name from the user database or a numeric user ID. Either specifies a user ID to be given to each file named
by one of the file operands. If a numeric owner operand exists in the user database as a user name, the user ID number associated with that
user name will be used as the user ID.
If the group portion of this operand is present, it must be a group name from the group database or a numeric group ID. Either spec-
ifies a group ID to be given to each file. If a numeric group operand exists in the group database as a group name, the group ID
number associated with that group name will be used as the group ID.
DESCRIPTION
[Tru64 UNIX] Only a user with superuser authority can use the chown command.
The owner argument must be a valid user name or a valid numerical user ID. The optional group argument must be a valid group name or a
valid numerical group ID.
EXIT STATUS
The following exit values are returned: The chown command executed successfully and all requested changes have been made. An error
occurred.
EXAMPLES
To change the owner of the file program.c, enter: chown steffan program.c
The user access permissions for program.c now apply to steffan. As the owner, steffan can use the chmod command to permit or deny the
other users access to program.c. See the chmod command for details.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of chown: Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
FILES
Contains user names and numeric user IDs.
SEE ALSO
Commands: chgrp(1), chmod(1), passwd(1)
Functions: chown(2), chmod(2)
Files: passwd(4)
Standards: standards(5)
chown(1)