首页 > 系统相关 >about gpasswd/chown/umask/chgrp/chmod command in linux

about gpasswd/chown/umask/chgrp/chmod command in linux

时间:2023-03-25 10:36:27浏览次数:40  
标签:about read sudo umask chmod write change gpasswd

admin user use sudo can be do:(拥有sudo权限应该做什么?)
1: add <username> to <groupname> group
sudo gpasswd -a <username> <groupname>

2: remove <username> from <groupname> group
sudo gpasswd -d <username> <groupname>

3: change owner of directory
sudo chown -R <username> /home/bee/test

 

 

normal user can be do direct:(普通用户权限可以做什么操作?)
It is important to set "umask 066" before operating files
"umask 066" means remove read & write, just keep execute.

1: change the group ownership of a file or directory
chgrp <groupname> ~/test

2: change ACLs of a file or directory
open or close read & write for group
chmod -R g+rw ~/test
chmod -R g-rw ~/test

open or close read & write for other
chmod -R o+r ~/test
chmod -R o-r ~/test

标签:about,read,sudo,umask,chmod,write,change,gpasswd
From: https://blog.51cto.com/xiangxisheng/6148905

相关文章

  • how can I use NSubstitute for stub and mock? any difference about the usage?
    howcanIuseNSubstituteforstubandmock?anydifferenceabouttheusage?NSubstituteisapopularmockinglibraryfor.NETthatallowsyoutocreatetestd......
  • about:日本小学怎么放假。——哎呀,怎么办,两个小坏蛋要放飞自我了。
    昨天孩子拿回一张纸,是通知周五小学开卒业式,那就是说要放假了呀。日本是4月开新学年,我们中国国内是随着前苏联的制度9月开新学年,因为前苏联4月冷呀,所以9月开新学年,大多数国......
  • linux chmod详解
    https://blog.csdn.net/jaber_chen/article/details/124261748文件的权限表示可以通过ll命令展示文件的信息chmod文件权限chmod命令chmod(changemode)命令是控制用......
  • Linux--chmod,chown
         ......
  • About Radio Telemetry
    AboutRadioTelemetryDroneTelemetryDataDronetelemetryisdatagatheredabouttheaircraftanditssurroundingsthatissentbacktotheoperatororground......
  • Introduction about HOBBYWING XRotor pro with Navigation LED 50A
    IntroductionaboutHOBBYWINGXRotorprowithNavigationLED50ACont./PeakCurrent:50/100AInput:4~6SLipoNOBECTypeorBECOutputProgrammingitem:LE......
  • About me
    男,初三,坐标SC,信息禁赛兼鬼畜竞赛选手。一般在各个平台的名字都叫\(\texttt{SqrtSecond}\),小号\(\texttt{CuberootTon}\)或者\(\texttt{SqrtSeconded}\)。有些平台......
  • CF319D Have You Ever Heard About the Word
    CF319DHaveYouEverHeardAbouttheWord好题,涉及复杂度分析,字符串结论,思维量较大。发现这种操作是不好同时进行的,我们只能较为“愚蠢”地模拟着操作,但是这种操作最多......
  • root 用户修改文件提示无权限 chmod: changing permissions of ‘authorized_keys’:
    使用lsattr命令查看文件的属性,使用chattr命令的修改文件的属性。解决修改文件提示无权限:chattr-i<file>chattr命令的详解参考链接【3】。参考链接:1、......
  • About me
    我是grass8cow,坐标四川,男,初三。非常菜,非常社恐,但和熟人会表现的很疯?博客可能出现的内容:1.每个月做的一些好题的题解。但因为是写给自己看的,所以一些表述会比较不严谨。......