简体   繁体   English

如何允许其他用户像我一样像 sudo 一样运行特定程序,但我们俩都不是 Linux 中的 root 用户

[英]How to allow other user to run a specific program as me like sudo, but both of us are not root in Linux

In Linux, I am user1 and my friend is user2 and we are in the same group.在Linux中,我是user1,我的朋友是user2,我们在同一个组。 In my home, I set read and execute permission to one program says /home/user1/some_program .在我的家里,我为一个程序设置了读取和执行权限,该程序说/home/user1/some_program How can I "grant" user2 to run /home/user1/some_program from his session but run as my id?我怎样才能“授权” user2 从他的会话中运行/home/user1/some_program但以我的身份运行? We are both not root.我们都不是root。

setfacl -mu:username:rwx myfolder 或 myfile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python 同时作为用户和 sudo 运行 - Python run both as user and sudo 编写可以以root / sudo身份运行的linux脚本 - Write a linux script that can be run as root/sudo linux如何允许用户读取/写入/删除从根目录创建的特定文件夹中的文件 - linux how to allow user to read/write/delete files created from root in a specific folder 在 linux ubuntu 中使用 CPAN 时,我应该使用 sudo / 作为 root 还是作为我的默认用户运行它 - when using CPAN in linux ubuntu should I run it using sudo / as root or as my default user 如何从使用sudo运行的程序访问用户的ssh密钥? - How to access user's ssh keys from the program that is run with sudo? shell_exec | 允许特定程序在apache用户下运行 - shell_exec | allow specific program to run under apache user linux中的其他用户如何授予root用户生成的文件权限? - How to give permission to root user generated file by other user in linux? sudo su给其他用户运行脚本 - sudo su to an other user to run script 如何让程序可以由拥有Linux所有者权限的特定用户运行 - How to let a program can be run by a specific user with owner's privilege on linux SSH从我的本地机器到linux主机,sudo到root用户 - SSH from my local machine to linux host and sudo to root user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM