How does Linux run programs in different user identities?

Source: Internet
Author: User
Keywords Linux user identity running programs
Tags aliyun different how should html linux name process root

How does Linux run programs in different user identities?

In the process of managing Linux, some of the time we need to specific users, given certain permissions to execute certain programs, how should we specify a different user identity to run the corresponding program? We can do this through the SU command:

Su-userhttp://www.aliyun.com/zixun/aggregation/11696.html ">name-c"/path/to/command "

Examples are as follows:

[Root@localhost software]# Whereis ls
LS:/bin/ls/usr/share/man/man1/ls.1.gz/usr/share/man/man1p/ls.1p.gz

[Root@localhost webserver]# su-www-c "/bin/ls"
[Root@localhost webserver]# su www
[Www@localhost webserver]$ Ls-la
Total Dosage 32
Drwxr-xr-x. 5 www. 4096 June 11 12:32.
Dr-xr-xr-x. Root 4096 June 13 14:00.
Drwxr-xr-x. 2 www. 4096 June 12:35 Logs
DRWX------. 2 www. 16384 June 8 16:21 Lost+found
Drwxr-xr-x. www www. 4096 June 16:53 www

Sometimes you need to run a special identity program so that SU can do

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.