Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

chown(8) [bsd man page]

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

chown - change owner SYNOPSIS
/usr/sbin/chown [ -f -R ] owner[.group] file ... DESCRIPTION
Chown changes the owner of the files to owner. The owner may be either a decimal UID or a login name found in the password file. An optional group may also be specified. The group may be either a decimal GID or a group name found in the group-ID file. Only the super-user can change owner, in order to simplify accounting procedures. No errors are reported when the -f (force) option is given. When the -R option is given, chown recursively descends its directory arguments setting the specified owner. When symbolic links are encountered, their ownership is changed, but they are not traversed. FILES
/etc/passwd SEE ALSO
chgrp(1), chown(2), passwd(5), group(5) 4th Berkeley Distribution May 22, 1986 CHOWN(8)

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.11 21 Jun 2004 chown(1B)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Frontpage extensions

Hi everyone. I'm trying to install Frontpage extensions capacity on my web server and getting this error: ./ line 59: 6763 Segmentation fault /usr/local/frontpage/version${VERSION}/bin/fpsrvadm.exe -o install -p $port $web $config -u $admin $server $chown -m "" ERROR: /... (6 Replies)
Discussion started by: alwayslearningunix
6 Replies

2. UNIX for Dummies Questions & Answers

Setuid root and chown

I am trying to run chown and chmod from a script owned by root. The permissions are set to 4755 so that users can execute the script as root. However, when I run the script as a user other than root, I get "Operation not permitted" for both chown and chmod. Any ideas as to why this is? (6 Replies)
Discussion started by: johnmsucpe
6 Replies

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

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

5. Shell Programming and Scripting

cp, chown, untar

hello i want shell script. i have a source.txt /home/user409/public_html/test/ /home/user09876/public_html/xdsss/ /home/user9765/public_html/320xxx/ . . . maybe 1000 lines i want . a source.txt 2.untar special.tar.gz into these directory in source.txt 3.i want to... (14 Replies)
Discussion started by: topic32428285
14 Replies

6. Solaris

NFS Share - chown problem

Hi all, I had share the server Gemini /u10 to the server Centaurus. /etc/dfs/dfstab share -F nfs -o root=centaurus /u10 My problem is: in the server Gemini the the owner for /U10 is oracle:dba but when in the server Centaurus, I am not able to change the owner become oracle:dba, it show... (8 Replies)
Discussion started by: SmartAntz
8 Replies

7. Web Development

ftp: missing chown command

hi, I'm connecting to a web server with ftp protocol and I would like to change some folders and files owner. I tried chown but it is not available. I typed "help" and this is the list I got. Is possible that the chown command is not installed on the server ? Or I don't have permissions ?... (8 Replies)
Discussion started by: aneuryzma
8 Replies

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

9. UNIX for Dummies Questions & Answers

chown: Operation not permitted as root

Hi Expert, I am trying to change ownership of one file to another user that is exist in the system but getting operation not permitted error what could be the correct way? # ls -lh .Xauthority_ori -rw------- 1 maxim atlas 2.8K Jul 27 17:18 .Xauthority_ori # id -a uid=0(root)... (8 Replies)
Discussion started by: regmaster
8 Replies

10. OS X (Apple)

sudo chown -R `whoami` /usr/local

I was following a tutorial on installing Homebrew and I changed the ownership of /usr/local/ to me. Now McAfee Security won't start This is the exact line I typed: sudo chown -R `whoami` /usr/local Then I tried to fix it with: sudo chown -R root /usr/local I still can't start mcafee. It say... (7 Replies)
Discussion started by: chancho
7 Replies

11. UNIX for Dummies Questions & Answers

How to log all file that has been move,chmod,chown?

Hi All, Seeking for your assistance on how to log that has been chmod,mv,chown,chgrp and how to prevent script running while chmod,mv,chown,chgrp are still running? Ex: a/b/c-folder file1.txt file2.txt file3.txt chmod 777 * chown owner owner group mv what i did was(please see... (6 Replies)
Discussion started by: nikki1200
6 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. Red Hat

Apache chown on its files not working

Hello, My apache user generate one file : # ls -lsa /tmp/reference_file.csv 76 -rwxrwxrwx 1 apache apache 69921 Aug 16 14:14 tmp/reference_file.csv the user and the group belong to apache, but when i am trying to change it : su -l apache -s /bin/bash -bash-3.00$ whoami apache... (7 Replies)
Discussion started by: cterra
7 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

Using chown command.

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

Featured Tech Videos