Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Chown command

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Chmod

And

Chown

The use of commands

I.

Chown

Command

Purpose:

Change the owner or group of the file.

Commands are made up of words

Change owner

It's a combination.

Examples of use:

one

, change the owner of the file:

Chown jim program.c

File

Program.c

The owner of the

Jim

. As the owner

Jim

Can be used

Chmod

Command to allow or deny other users

Visit

Program.c

.

two

To change the owner of the directory:

Chown-R john:build / tmp/src

Change the directory

/ tmp/src

The owners and groups of all files in the change to users

John

And group

Build

-R

Recursively changes the owner of the specified directory and all subdirectories and files under it.

-v

Display

Chown

The work ordered to be done.

(

Eg.

Chown

-

R root:root rootfs

Set

Rootfs

The permissions and groups of the folder and its subrecords are changed to

Root

Chown

-

R liufan:liufan-desktop rootfs

Change the directory

Rootfs

The owners and groups of folders and subdirectories are changed to use the

Households

Liufan

And group

Liufan-desktop

)

Chmod

And

Chown

The use of commands

I.

Chown

Command

Purpose:

Change the owner or group of the file.

Commands are made up of words

Change owner

It's a combination.

Examples of use:

one

, change the owner of the file:

Chown jim program.c

File

Program.c

The owner of the

Jim

. As the owner

Jim

Can be used

Chmod

Command to allow or deny other users

Visit

Program.c

.

two

To change the owner of the directory:

Chown-R john:build / tmp/src

Change the directory

/ tmp/src

The owners and groups of all files in the change to users

John

And group

Build

-R

Recursively changes the owner of the specified directory and all subdirectories and files under it.

-v

Display

Chown

The work ordered to be done.

(

Eg.

Chown

-

R root:root rootfs

Set

Rootfs

The permissions and groups of the folder and its subrecords are changed to

Root

Chown

-

R liufan:liufan-desktop rootfs

Change the directory

Rootfs

The owners and groups of folders and subdirectories are changed to use the

Households

Liufan

And group

Liufan-desktop

)

Chmod

And

Chown

The use of commands

I.

Chown

Command

Purpose:

Change the owner or group of the file.

Commands are made up of words

Change owner

It's a combination.

Examples of use:

one

, change the owner of the file:

Chown jim program.c

File

Program.c

The owner of the

Jim

. As the owner

Jim

Can be used

Chmod

Command to allow or deny other users

Visit

Program.c

.

two

To change the owner of the directory:

Chown-R john:build / tmp/src

Change the directory

/ tmp/src

The owners and groups of all files in the change to users

John

And group

Build

-R

Recursively changes the owner of the specified directory and all subdirectories and files under it.

-v

Display

Chown

The work ordered to be done.

(

Eg.

Chown

-

R root:root rootfs

Set

Rootfs

The permissions and groups of the folder and its subrecords are changed to

Root

Chown

-

R liufan:liufan-desktop rootfs

Change the directory

Rootfs

The owners and groups of folders and subdirectories are changed to use the

Households

Liufan

And group

Liufan-desktop

)

Chown

Chown command

Purpose: change the owner or group of the file. The command is a combination of the word change owner.

A file is required to allow only its owner control, array and other users do not have any permissions, how should the permissions be changed?

Chmod upright RWX migmatics RWX guru RWX Mustang RWX Mustang RWX

Chmod axiomagery axiomageny, glimerglyr, glichenglywrewrewrewwwlemagomo LeiwLeix file.

What are the default permissions for root users when creating files and directories? File permissions 644 / directory permissions 755

If you set the current user's umask to 003, what are the default permissions for files and directories?

777-003

Rwx rwx rwx--- wx- rwx rwx rmuri-= 774

666-003

Rw- rw- rw---- wx-rw- rw- Rmuri-= 664

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report