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

How to use Chown to modify user attributes in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Linux how to use Chown to modify user attributes, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Chown modifies the user and user group properties of files and folders

1, to modify the owner of the file hh.c. It is owned by the user who changed it to sakia.

Chown sakia hh.c

This applies the user access of hh.c to sakia as the owner

2. Change the owner and group of the directory / tmp/sco to sakia and group net

Chown-R sakia:net / tmp/sco

Chmod modifies read-write execution properties of files and folders

1. Modify the hh.c file to be writable, readable and executable

Chmod 777 hh.c

To modify all file attributes in a directory to be writable, readable and executable

Chmod 777 *. *

Replace the folder name and suffix name with *.

By the same token, if you want to modify the properties of all htm files

Chmod 777 * .htm

2. Modify the directory / tmp/sco to be writable, readable and executable

Chmod 777 / tmp/sco

To modify all folder properties under a directory to be writable, readable and executable

Chmod 777 *

Just replace the folder name with *.

To modify the properties of all files and folders and their subfolders under / tmp/sco to be writable, readable and executable

Chmod-R 777 / tmp/sco

Writable wish4

Readable riter2

Executable xroom1

777 is full access. You can freely combine the permissions of users and groups as needed.

After reading the above, have you mastered how to use Chown to modify user properties in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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

Servers

Wechat

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

12
Report