Permission-change the file owner and group-chown

Source: Internet
Author: User
Tags superuser permission
The chown command is used to change the owner and group of files or directories. The superuser permission is required to use this command.

Introduction

The chown command is used to change the owner and group of files or directories. This command requires the permissions of the Super User.

========================================================== ====

Format

Chown [ower] [: [group] file...

========================================================== ====

Description

The chown command changes the file owner, the group to which the file belongs, or both of them, depending on the first parameter of the command.

========================================================== ====

Some Parameter examples

Parameters

Result

Bob

Change the file owner from the current owner to user bob.

Bob: users

Change the file owner from the current owner to user bob, and change the group to user group.

: Admins

Change the group to which the file belongs to the admins group, and the file owner remains unchanged.

Bob:

Change the file owner from the current owner to user bob, and change the group to which bob belongs when logging on to the system.

========================================================== ====

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.