Sei sulla pagina 1di 15

1) How to configure Yum Server Repository & Yum Client

Scenario: 1
============================================
How to configure Yum Server Repository & Yum Client:
====================================================
A) Configure the server1.example.com as Yum server for RHEL6.
- You can find the RHEL6 ISO Image at /media/rhel6.iso
B) Configure the Yum Client to use local YUM Repository.
Repository url = ftp://server1.example.com/pub/rhel6/repo
====================================================
1) Mount the CD or ISO Image to Directory.
# mkdir -p /rhel6/iso
# cp /media/rhel6.iso /rhel6/iso/
# mkdir -p /rhel6/iso_mount
# mount -o loop /rhel6/iso/rhel6.iso /rhel6/iso_mount
2) Install FTP server by installing vsftpd rpm.
# cd /rhel6/iso_mount/Packages/
# rpm -ivh vsftpd-2.2.2-6.el6.i686.rpm
# service vsftpd status
vsftpd is stopped
# service vsftpd start
Starting vsftpd for vsftpd:
# chkconfig vsftpd on
# chkconfig --list vsftpd
vsftpd
0:off
1:off

[ OK ]
2:on

3:on

4:on

5:on

6:off

3) Install createrepo & dependant rpms.


# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
4) Copy the Redhat RPMs for FTP based Repository.
# mkdir -p /var/ftp/pub/rhel6/repo
# cp /rhel6/iso_mount/Packages/*.rpm /var/ftp/pub/rhel6/repo
5) Configure RHEL Server for Package Repository.
# createrepo -v /var/ftp/pub/rhel6/repo/
# restorecon /var/ftp/pub/
6) Configure Yum Client Configuration:
6.1) # vim /etc/yum.conf
******************************************************************
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
# IMP Note: set gpgcheck value to 0

gpgcheck=0
plugins=1
installonly_limit=3
******************************************************************
6.2) # vim /etc/yum.repos.d/rhel6.repo
******************************************************************
[rhel6]
name=rhel6_repo
# Note: While using local repository using file need to use /// [three times].
baseurl=file:///var/ftp/pub/rhel6/repo
#baseurl=http://server1.example.com/rhel6/repo
#baseurl=ftp://server1.example.com/pub/rhel6/repo
enabled=1
gpgcheck=0
*****************************************************************
6.3) # yum clean all
6.4) # mkdir -p /var/cache/yum/i386/6Server
6.5) # yum clean all
******************************************************************
Loaded plugins: refresh-packagekit, rhnplugin
Cleaning up Everything
******************************************************************
6.6) # yum update all
******************************************************************
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
rhel6
| 1.3 kB
00:00 ...
rhel6/primary
| 1.3 MB
00:00 ...
rhel6
2679/2679
Setting up Update Process
No Match for argument: all
No package all available.
No Packages marked for Update
******************************************************************
6.7) Verify Yum Server & Client Configuration
# yum -y install firefox
************************************************************************************************
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package firefox.i686 0:3.6.9-2.el6 set to be updated
--> Processing Dependency: system-bookmarks for package: firefox-3.6.9-2.el6.i686
--> Running transaction check
---> Package redhat-bookmarks.noarch 0:6-1.el6 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved

==================================================================================
Package
Arch
Version
Repository
Size
==================================================================================
Installing:
firefox
i686
3.6.9-2.el6
rhel6
14 M
Installing for dependencies:
redhat-bookmarks
noarch
6-1.el6
rhel6
4.2 k
Transaction Summary
==================================================================================
Install
2 Package(s)
Upgrade
0 Package(s)
Total download size: 14 M
Installed size: 17 M
Downloading Packages:
-----------------------------------------------------------------------------------------------Total
120 MB/s | 14 MB
00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing
: redhat-bookmarks-6-1.el6.noarch
1/2
Installing
: firefox-3.6.9-2.el6.i686
2/2
Installed:
firefox.i686 :3.6.9-2.el6
Dependency Installed:
redhat-bookmarks.noarch 0:6-1.el6
Complete!
************************************************************************************************

2) How to Increase SWAP Memory


Scenario: 2
===============================================================================
Increase your SWAP by 512MB. Both SWAP Partitions must be available.
Youre New SWAP space should be mounted at the booting time also.
===============================================================================
===================
INCREASE SWAP SPACE
===================
Verify the current Disk Partitioning:
*************************************
A) If Server has LVM Partitioning:
- Refer the Method 1 below.
B) If Server has Normal Partitioning:
- Refer the Method 2 below.
C) If Server has no free space on LVM or Normal Partitions:
- Create file and allocate for additional SWAP:

- Refer the Method 3 below.


-----------------------------------------------------------------------------------Method 1: Allocate Hard Drives LVM Partition Free Space to Swap
-----------------------------------------------------------------------------------1) Verify the current SWAP SPACE:
*********************************
a) # free -m
total
used
free
shared buffers
Mem:
1952
1795
157
0
55
-/+ buffers/cache:
262
1689
Swap:
3935
0
3935

cached
1477

b) # swapon -s
Filename
/dev/dm-1

Type
partition 4030456

Size
0

Used
-1

Priority

c) # cat /proc/swaps
Filename
/dev/dm-1

Type
partition 4030456

Size
0

Used
-1

Priority

2) Verify Hard Drive's free available space for partition creation.


***************************************************************
SCENARIO: Where Server has LVM partitions. Utilize the existing Volum group[vg_1] available free
space:
1.1) # parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted)print free
Model: ATA ST3160318AS (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number
1
2
3
(parted) q

Start
32.3kB
105GB
105GB
105GB
160GB

End
105GB
105GB
105GB
160GB
160GB

Size
Type
105GB primary
682kB
524MB primary
54.7GB primary
877kB

1.2) Verify If Volume Group has free space.


# vgdisplay
--- Volume group --VG Name
vg_1
System ID
Format
lvm2

File system
ntfs
Free Space
ext4
lvm
Free Space

Flags
boot

Metadata Areas
1
Metadata Sequence No 5
VG Access
read/write
VG Status
resizable
MAX LV
0
Cur LV
4
Open LV
4
Max PV
0
Cur PV
1
Act PV
1
VG Size
50.90 GiB
PE Size
4.00 MiB
Total PE
13031
Alloc PE / Size
10805 / 42.21 GiB
Free PE / Size
2226 / 8.70 GiB
VG UUID
fGpkBe-01gA-yblA-dwsm-z2Eb-zctm-DlHash

2.1) Create LVM partition & Configure System to use additional SWAP Space.
**************************************************************************
1.3) Create Logical Volume of 512 MB for SWAP
# lvcreate -L 512M -n lv_swap2 vg_1
Logical volume "lv_swap2" created
1.4) Format the Partition as SWAP.
# mkswap -f /dev/vg_1/lv_swap2
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=23925fe4-a533-4f4d-b214-a38803ff0138
1.5) Configured the SWAP LV to use as SWAP SPACE.
# swapon /dev/vg_1/lv_swap2
1.6) Verify the SWAP Space:
1.6.1) # free -m
total
used
free
shared buffers
Mem:
1952
1787
165
0
6
-/+ buffers/cache:
293
1658
Swap:
4447
0
4447

Priority

Priority

1.6.2) # swapon -s
Filename
/dev/dm-1
/dev/dm-4
1.6.3) # cat /proc/swaps
Filename
/dev/dm-1
/dev/dm-4

Type
partition 4030456
partition 524280 0

Type
partition 4030456
partition 524280 0

cached
1486

Size
0
-2

Size
0
-2

Used
-1

Used
-1

1.7) Configure SWAP2 partition in FSTAB entry to have additional space available post reboot.
#

# /etc/fstab
# Created by anaconda on Sun Jun 24 15:39:01 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_1-lv_root
/ ext4
defaults
1
1
UUID=791eacef-480a-49ed-8f89-a1538a2bfc35 /boot ext4 defaults 1 2
/dev/mapper/vg_1-lv_home
/home ext4
defaults 1 2
/dev/mapper/vg_1-lv_var
/var
ext4
defaults 1 2
/dev/mapper/vg_1-lv_swap
swap
swap
defaults 0 0
tmpfs
/dev/shm
tmpfs
defaults 0 0
devpts
/dev/pts
devpts gid=5,mode=620 0 0
sysfs
/sys
sysfs
defaults 0 0
proc
/proc
proc
defaults 0 0
/dev/vg_1/lv_swap2
swap
swap
defaults
0 0
1.8) Restart the Machine and Verify:
1.8.1) # free -m
total
used
Mem:
1952
1787
-/+ buffers/cache:
293
Swap:
4447
0

free
165
1658
4447

shared
0

buffers
6

cached
1486

1.8.2) # swapon -s
Filename
/dev/dm-1
/dev/dm-4

Type
partition
partition

Size Used Priority


4030456 0
-1
524280 0
-2

1.8.3) # cat /proc/swaps


Filename
/dev/dm-1
/dev/dm-4

Type
partition
partition

Size Used Priority


4030456 0
-1
524280 0
-2

------------------------------------------------------------Method 2: Allocate Hard Drive Normal Partition to Swap Space:


------------------------------------------------------------1) Verify the current SWAP SPACE:
*********************************
a) # free -m
total
used
free
shared buffers
Mem:
2023
374
1648
0
131
-/+ buffers/cache:
121
1901
Swap:
5119
0
5119
b) # swapon -s
Filename
Priority
/dev/sda2
c) # cat /proc/swaps
Filename
Priority

Type
partition 5242872

Type

cached
122

Size
0

Size

Used
-1

Used

/dev/sda2

partition 5242872

-1

2) Verify Hard Disk has free space available to create partition.


*****************************************************************
SCENARIO: Where Server has Normal partitions. Utilize the free space to create
partition:

1.1) # fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abf0b
Device Boot
Start
End
Blocks Id System
/dev/sda1 *
1
64
512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2
64
717 5242880 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3
717
3328 20971520 83 Linux
/dev/sda4
3328
5222 15215616 5 Extended
/dev/sda5
3328
4372
8388608 83 Linux
1.2) # parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
(parted) print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 42.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End
Size Type
File system
Flags
32.3kB 1049kB 1016kB
Free Space
1
1049kB 525MB 524MB primary ext4
boot
2
525MB 5894MB 5369MB primary linux-swap(v1)
3
5894MB 27.4GB 21.5GB primary ext4
4
27.4GB 42.9GB 15.6GB extended
5
27.4GB 36.0GB 8590MB logical ext4
36.0GB 42.9GB 6989MB
Free Space

1.3) # fdisk /dev/sda


WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n


First cylinder (4373-5222, default 4373): 4373
Last cylinder, +cylinders or +size{K,M,G} (4373-5222, default 5222): +512M
Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abf0b
Device Boot
Start
End
Blocks Id System
/dev/sda1 *
1
64
512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2
64
717 5242880 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3
717
3328 20971520 83 Linux
/dev/sda4
3328
5222 15215616 5 Extended
/dev/sda5
3328
4372
8388608 83 Linux
/dev/sda6
4373
4438
530123+ 83 Linux
Command (m for help): t
Hex code (type L to list codes): 82
Changed system type of partition 6 to 82 (Linux swap / Solaris)
Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000abf0b
Device Boot
Start
End
Blocks Id System
/dev/sda1 *
1
64
512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2
64
717 5242880 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3
717
3328 20971520 83 Linux
/dev/sda4
3328
5222 15215616 5 Extended
/dev/sda5
3328
4372 8388608 83 Linux
/dev/sda6
4373
4438
530123+ 82 Linux swap / Solaris
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or
resource busy.
The kernel still uses the old table. The new table will be used at

the next reboot or after you run partprobe(8) or kpartx(8)


Syncing disks.

1.4) # partx -a /dev/sda [First Time it will show only existing Resource]
BLKPG: Device or resource
error adding partition 1
BLKPG: Device or resource
error adding partition 2
BLKPG: Device or resource
error adding partition 3
BLKPG: Device or resource
error adding partition 4
BLKPG: Device or resource
error adding partition 5

busy

1.4) # partx -a /dev/sda

[Second Time it will show the new created Partition]

BLKPG: Device or resource


error adding partition 1
BLKPG: Device or resource
error adding partition 2
BLKPG: Device or resource
error adding partition 3
BLKPG: Device or resource
error adding partition 4
BLKPG: Device or resource
error adding partition 5
BLKPG: Device or resource
error adding partition 6

busy

busy
busy
busy
busy

busy
busy
busy
busy
busy

1.5) # mkswap -f /dev/sda6


Setting up swapspace version 1, size = 530116 KiB
no label, UUID=8e320041-d8b5-4b7a-90cc-214065124b0d
1.6) # swapon -s
Filename
Priority
/dev/sda2

Type

Size

partition 5242872

Used
-1

1.7) # swapon /dev/sda6


1.8) Verify the SWAP Space size:
a) # swapon -s
Filename
Priority
/dev/sda2
/dev/sda6
b) # free -m

Type
partition 5242872
partition 530112 0

Size
0
-2

Used
-1

total
used
free
shared buffers
Mem:
2023
376
1646
0
132
-/+ buffers/cache:
122
1900
Swap:
5637
0
5637

cached
122

c) # cat /proc/swaps
Filename
Priority
/dev/sda2
/dev/sda6

Type
partition 5242872
partition 530112 0

Size
0
-2

Used
-1

1.9) Configure SWAP2 partition in FSTAB entry to have additional space available post reboot.
# vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed May 30 01:33:24 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=535d271b-f69a-4ee7-bb80-4cf9484f96b7 / ext4 defaults
11
UUID=0ff225aa-259a-4753-ba3a-8655d9ffdd0b /boot ext4 defaults
12
UUID=3c9f2b95-7ef2-4313-b803-11f5551e30bd /var ext4 defaults
12
UUID=ecc42979-0510-47c5-a14e-b5279fffaa61 swap swap defaults
00
tmpfs
/dev/shm
tmpfs defaults
00
devpts
/dev/pts
devpts gid=5,mode=620 0 0
sysfs
/sys
sysfs defaults
00
proc
/proc
proc
defaults
00
/dev/sda6
swap
swap
defaults 0 0
1.10) Restart the Machine and Verify:
a) # swapon -s
Filename
Priority
/dev/sda2
/dev/sda6

Type
partition 5242872
partition 530112 0

Size
0
-2

Used
-1

b) # free -m
total
used
free
shared buffers
Mem:
2023
376
1646
0
132
-/+ buffers/cache:
122
1900
Swap:
5637
0
5637
c) # cat /proc/swaps
Filename
Priority
/dev/sda2
/dev/sda6

Type
partition 5242872
partition 530112 0

cached
122

Size
0
-2

Used
-1

--------------------------------------------------------------Method 3: Allocate File for additional Swap Space :


---------------------------------------------------------------

1) Veify the Existing partitions:


# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002b08
Device Boot
Start
End
Blocks Id System
/dev/sda1 *
1
64
512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2
64
2675 20971520 83 Linux
/dev/sda3
2675
3720
8388608 83 Linux
/dev/sda4
3720
5222 12069888 5 Extended
/dev/sda5
3720
4372
5242880 82 Linux swap / Solaris
2) Verify the current SWAP Space:
a) # free -m
total
used
free
shared buffers
Mem:
2023
352
1670
0
-/+ buffers/cache:
121
1901
Swap:
5119
0
5119

cached
129

101

b) # swapon -s
Filename
Priority
/dev/sda5

Type
partition 5242872

Size
0

Used
-1

c) # cat /proc/swaps
Filename
Priority
/dev/sda5

Type
partition 5242872

Size
0

3) Create File of 152 MB size for SWAP allocation:


a) Below command will create file of 512MB on /root/
# dd if=/dev/zero of=/root/myswapfile bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 14.4601 s, 37.1 MB/s

Used
-1

4) Configured Proper Access rights for the File to be used for SWAP.
# chmod 600 /root/myswapfile
# ls -lh /root/myswapfile
-rw-------. 1 root root 512M Jun 25 15:00 /root/myswapfile
5) Format the File as SWAP FS
# mkswap /root/myswapfile
mkswap: /root/myswapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=8539d349-48cd-43c2-beaa-d6e56745f009
6) Add File space to current SWAP Space.
# swapon /root/myswapfile
7) Verify the SWAP Space
a) # swapon -s
Filename
Priority
/dev/sda5
/root/myswapfile

Type

Size

partition 5242872
0
file
524280 0

Used
-1
-2

b) # free -m
total
used
free
shared buffers
Mem:
2023
874
1148
0
130
-/+ buffers/cache:
130
1892
Swap:
5631
0
5631

cached
613

c) # cat /proc/swaps
Filename
Priority
/dev/sda5
/root/myswapfile

Type

Size

partition 5242872
0
file
524280 0

Used
-1
-2

8) Configured /etc/fstab file to have Additional swap added post reboot.


# vim /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Jun 1 06:01:37 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=ce2cbdf9-b7e6-4cfc-888a-5235a6a256ae / ext4 defaults
11

UUID=d301daac-e278-4aa1-b1d7-cec34ae05a0f /boot ext4 defaults


UUID=d1f27f52-6583-4487-9077-4af03b8a6c96 /var ext4 defaults
UUID=50e85e9f-6cac-4f08-a8fc-41eb0228b8b3 swap swap defaults
tmpfs
/dev/shm
tmpfs defaults
00
devpts /dev/pts
devpts gid=5,mode=620 0 0
sysfs
/sys
sysfs defaults
00
proc
/proc
proc defaults
00
/root/myswapfile
swap swap defaults
00
9) Reboot the machine and verify the SWAP Space.
a) # swapon -s
Filename
Priority
/dev/sda5
/root/myswapfile

Type

Size

partition 5242872
0
file
524280 0

Used
-1
-2

b) # free -m
total
used
free
shared buffers
Mem:
2023
874
1148
0
130
-/+ buffers/cache:
130
1892
Swap:
5631
0
5631

cached
613

c) # cat /proc/swaps
Filename
Priority
/dev/sda5
/root/myswapfile

Type

Size

partition 5242872
0
file
524280 0

Used
-1
-2

12
12
00

3) User & Group Administration


Scenario:3
===================================================
Creat the following users, groups and group memberships.
- A Group named "sysadmins".
- A user natasha, who belongs to "sysadmins" as a secondary group.
- A user harry, who also belongs to "sysadmins" as a secondary group.
- A user sarah, who does not have access to any interactive shell on the
system and who is not a member of "sysadmins" group.
- natasha, harry and sarah should all have the password of postroll.
===================================================
# groupadd sysadmins
# useradd -G sysadmins natasha
# useradd -G sysadmins harry
#useradd -s /sbin/nologins sarah
# passwd natasha
Changing password for user natasha.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
# passwd harry
Changing password for user harry.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
# passwd sarah
Changing password for user sarah.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.

4) File System Access Administration


Scenario:4
==========================================================
Create a collaborative directory /home/materials with following
characteristics.
- Group ownership of /home/materials is "sysadmins".
- The directory should be readable, writable and accessible to members of
"sysadmins", but not to any users.
[It is understood that root has access to all files and directories on the
system]
- Files created in /home/materials should automatically have group ownership
set to the "sysadmins" group.
==========================================================
# mkdir /home/materials
# cd /home
# chgrp sysadmins ./materials/
# ll -lZ
drwx------. bertarm bertarm unconfined_u:object_r:user_home_dir_t:s0 bertarm
drwx------. harry harry unconfined_u:object_r:user_home_dir_t:s0 harry
drwxr-xr-x. root sysadmins unconfined_u:object_r:home_root_t:s0 materials
drwx------. mehul mehul unconfined_u:object_r:user_home_dir_t:s0 mehul
drwx------. natasha natasha unconfined_u:object_r:user_home_dir_t:s0 natasha
drwx------. sarah sarah unconfined_u:object_r:user_home_dir_t:s0 sarah
# restorecon -Rv /home
restorecon reset /home/materials context unconfined_u:object_r:home_root_t:s0>unconfined_u:object_r:user_home_dir_t:s0
# chmod 2770 ./materials/
# ll
total 24
drwx------. 4 bertarm bertarm 4096 Jun 27 23:34 bertarm
drwx------. 4 harry harry 4096 Jun 27 23:53 harry
drwxrws---. 2 root sysadmins 4096 Jun 28 18:29 materials
drwx------. 26 mehul mehul 4096 May 30 06:19 mehul
drwx------. 4 natasha natasha 4096 Jun 28 18:27 natasha
drwx------. 4 sarah sarah 4096 Jun 28 18:28 sarah

Potrebbero piacerti anche