[Yzadmin@yscache15a37 local]$ su root Password: [root@yscache15a37 local]# Chown-r
Chown:invalid option-' R ' Try ' Chown--help ' for more information. [Root@yscache15a37 local]# chown-r yzadmin:yzgrp/usr/local/redis-4.0.6 [root@yscache15a37 local]# ll Total 1728 drwxr-x R-x. 2 root root 4096 3 13:01 bin Drwxr-xr-x. 2 root root 4096 Sep etc drwxr-xr-x. 2 root 4096 Sep games drwxr-xr-x. 2 root 4096 Sep include drwxr-xr-x. 2 root 4096 Sep drwxr-xr-x lib. 2 root 4096 Sep lib64 drwxr-xr-x. 2 root 4096 Sep libexec drwxrwxr-x 7 yzadmin yzgrp 4096 3 10:50 redis-4.0.6-rw-r--r--1 ro OT root 1723533 3 10:17 redis-4.0.6.tar.gz drwxr-xr-x. 2 root 4096 Sep sbin drwxr-xr-x. 5 root 4096 Dec 11:17 share drwxr-xr-x. 2 root 4096 3 15:23 src [root@yscache15a37 local]# CD redis-4.0.6 [root@yscache15a37 redis-4.0.6]# ll Total 292-rw-rw-r--1 yzadmin yzgrp 142334 Dec 5 01:01 00-rel easenotes-rw-rw-r--1 yzadmin yzgrp Dec 5 01:01 bugs-rw-rw-r--1 yzadmin yzgrp 1815 Dec 5 01:01 contributin g-rw-rw-r--1 yzadmin yzgrp 1487 Dec 5 01:01 copying drwxrwxr-x 6 yzadmin yzgrp 4096 no more than 3 11:13 deps-rw-rw-r-- 1 yzadmin yzgrp Dec 5 01:01 install-rw-rw-r--1 yzadmin yzgrp 151 Dec 5 01:01 makefile-rw-rw-r--1 YZADMI N yzgrp 4223 Dec 5 01:01 manifesto-rw-rw-r--1 yzadmin yzgrp 20543 Dec 5 01:01 readme.md drwxr-xr-x 4 yzadmin yzgr P 4096 3 10:51 redis-cluster-rw-rw-r--1 yzadmin yzgrp 57764 Dec 5 01:01 redis.conf-rwxrwxr-x 1 yzadmin yzgrp 271 DEC 5 01:01 runtest-rwxrwxr-x 1 yzadmin yzgrp 280 Dec 5 01:01 runtest-cluster-rwxrwxr-x 1 yzadmin yzgrp 281 DEC 5 01:01 runtest-sentinel-rw-rw-r--1 yzadmin yzgrp 7606 Dec 5 01:01 sentinel.conf drwxrwxr-x 3 yzadmin yz GRP 4096 3 13:01SRC drwxrwxr-x yzadmin yzgrp 4096 Dec 5 01:01 tests drwxrwxr-x 8 yzadmin yzgrp 4096 Dec 5 01:01 utils
Give a Yzadmin account permission to use a folder
Chown-r yzadmin:yzgrp/usr/local/redis-4.0.6
The command inside is-R yzadmin is the account YZGRP is its corresponding group to assign permissions under root