Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

chown(8) [ultrix man page]

chown(8)						      System Manager's Manual							  chown(8)

       chown - change owner and, optionally, group

       /etc/chown [ -fR ] owner[.group] file...

       The  command  changes  the owner and, optionally, group for one or more files and directories.  The value for file can be a full or partial
       path.  The value for owner can be either a decimal UID or a login name found in the password file.  The value for group	can  be  either  a
       decimal GID or a group name found in the group file.

       Only  the  superuser  can change the ownership of a file.  The superuser can also change the group of a file.  The owner of a file can only
       change the group, but the owner must be a member of any group specified.

       -f   Inhibits display of errors that are returned when cannot change the owner or group of the specified files.

       -R   Causes to recursively descend any directories subordinate to file and to set the owner, group, or  both  for  each	file  encountered.
	    When  symbolic  links  are encountered, changes the owner and group for the link file itself but does not traverse the path associated
	    with the link.  The option is useful only when file is a directory that is not empty.

       Change the owner of to ecbell:
       /etc/chown ecbell myfile

       Change the owner of to craig and group of to admin:
       /etc/chown craig.admin myfile

       Change the owner to richart and group to eng for the directories and and for all files and directories on any levels subordinate to and
       /etc/chown -R richart.eng projecta projectb

       See Also
	      chgrp(1), chown(2), group(5), group(5yp), passwd(5), passwd(5yp)


Check Out this Related Man Page

chown(1B)					     SunOS/BSD Compatibility Package Commands						 chown(1B)

chown - change owner SYNOPSIS
/usr/ucb/chown [-fR] owner[.group] filename... DESCRIPTION
chown changes the owner of the filenames to owner. The owner can be either a decimal user ID (UID) or a login name found in the password file. An optional group can also be specified. The group can be either a decimal group ID (GID) or a group name found in the GID file. In the default case, only the super-user of the machine where the file is physically located can change the owner. The system configura- tion option {_POSIX_CHOWN_RESTRICTED} and the privileges PRIV_FILE_CHOWN and PRIV_FILE_CHOWN_SELF also affect who can change the ownership of a file. See chown(2) and privileges(5). OPTIONS
The following options are supported: -f Do not report errors. -R Recursively descend into directories setting the ownership of all files in each directory encountered. When symbolic links are encountered, their ownership is changed, but they are not traversed. USAGE
See largefile(5) for the description of the behavior of chown when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). FILES
/etc/passwd Password file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
chgrp(1), chown(2), group(4), passwd(4), attributes(5), largefile(5), privileges(5) SunOS 5.10 21 Jun 2004 chown(1B)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change owner

How to change the owner of group? -rw-r--r-- 1 lead lead Now I need to change LEAD to SUBLEAD.. how do I do this. I am using this command. $chown -R sublead test.lck I get this message chown: test.lck: Not owner I am logged in a LEAD.. All your help in regards are greatly... (16 Replies)
Discussion started by: venkyA
16 Replies

2. UNIX for Advanced & Expert Users

chown doesn't work

Hi unix gurus, I am facing problem with chown command. I am not able to change the owner of any file in my home. It gives error "not owner", though I own the file(as ls shows). What could be the reason? Is it possible that usage chown can be disabled for users. $ $ ls -l total 2... (10 Replies)
Discussion started by: shriashishpatil
10 Replies

3. UNIX for Advanced & Expert Users

chown issue

I have a strange problem in my Linux box (Suse). Recently I took over this box as admin even though I have no prior admin experience. Following is my issue I had following users under 'root' group initially user1 user2 user3 Since I did not like user ids under root group. I modifed these... (9 Replies)
Discussion started by: praveenkumar_l
9 Replies

4. UNIX for Dummies Questions & Answers

I am the owner,yet not allowed the change the ownership

sm860 IS the owner of the files below,but yet sm860 cannot change the ownership to bpt3a1.Please let me know why ? See below for details --- sm860@unixs741_DEV:/usr/gdp/home/ftp/bpt3a1/incoming/ahdb/T5/pcasav/daily $ ls -l pcasav* -rw-r--r-- 1 sm860 gdpintegrators 821 Sep 21 16:15... (8 Replies)
Discussion started by: MSHETTY
8 Replies

5. UNIX for Advanced & Expert Users

Is there a command to get the owner of a file?

At the moment I'm just using `ls -o` (with `cut`), but `ls` is obviously giving me a lot more output than just the file owner. (9 Replies)
Discussion started by: Bilge
9 Replies

6. Solaris

change permissons and owner for /tmp (swapfs)

Hi all, i've an Solaris 10 installation. The owner and permissions for /tmp is: # ls -l /tmp # rwxr-xr-x root root /tmp They should be (i've looked at a clean installation): # rwxrwxrwt root sys /tmp I've tried to change the permissons after booting from cd and mounting the root... (10 Replies)
Discussion started by: DukeNuke2
10 Replies

7. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

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)
Discussion started by: TheGunMan
14 Replies

8. Solaris

How to start tomcat with 2 jdk?

Current platform: Sun OS 5.9 Solaris isainfo -v 64-bit sparcv9 applications 32-bit sparc applications Problem: Fail to start tomcat server ps -ef | grep tomcat nothing displays... Steps: Installed jakarta-tomcat-5.0.30 Installed jdk 1.6 and set path in profile... (11 Replies)
Discussion started by: sbox
11 Replies

9. Cybersecurity

Change file owner

What i did: - logged in with acc1 and created a new user acc2 commands used: useradd and passwd. - Then i logged in acc2. but all the files are owned by acc1. Issue: I try to change the owner of the files using chown command . But it gives me a error message. All i want to do is... (13 Replies)
Discussion started by: TotallyConfused
13 Replies

10. Shell Programming and Scripting

Shell script that lists files with different owner than the folder

Hello, I'm trying to write a script which is listing files based on different preferences, like filetype or permissions. All is fine, except for one: I want to list files in /home which has a different owner than the home directory it is in. Here is an example: /home/UserA is the directory, and... (10 Replies)
Discussion started by: Zwiebi
10 Replies

11. Emergency UNIX and Linux Support

Accidentally Changed File Ownership to Include a "Comment" [AIX]

Hi. I've had a little mishap. To cut a long story short, I've accidentally recursively ran chown on a directory (actually a bunch of 'em). Not a problem in itself, but I had a slight error in the code I used to get the list of directories and ended up with a comment in the file ownership. ... (15 Replies)
Discussion started by: Scott
15 Replies

12. 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

13. SuSE

Find command doesn't pipe the output as required.

Hi, I am using below code snippet to echo/display the files found (matching a pattern from searchstring.out file) and the corresponding owner. while read j do echo "Pattern to search is:- $j" find / -name "*$j*" |\ while read k do echo "File found is:- $k" owner=$(ls... (9 Replies)
Discussion started by: Vipin Batra
9 Replies

14. UNIX for Beginners Questions & Answers

File group issues

Hi All, I have a script which called by user id (mftp) . The set up is working on two server and not working one server. Working Server : -rw-rw-r-- 1 mftp csp 0 Jan 17 00:14 117001.log Non working server -rw-rw-r-- 1 mftp mftp 0 Jan 17 00:14 117001.log from the above... (18 Replies)
Discussion started by: arunkumar_mca
18 Replies

15. Shell Programming and Scripting

Search for files owned by particular owner and group

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)
Discussion started by: Soham
9 Replies