How To Set Permission For Folders and Subfolders in Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-permission-folders-subfolders-linux/
PINTEREST
PINTEREST
INSTAGRAM

There is different ways to set folder and subfolder permission in linux but here we will describe most convenient way.

Say we have folder /opt/lamp and we want to change all sub folders permission to change 660. Using chmod with recursive options is the simplest one.

Change Directory Permission with Find

IF we only want to change permission of directory we need to specify the type as directory .

Change File Permission with Find

We can specify the type as file and change only files permissions. In this example we will change files located at /opt/lamp to 660 .

Change File Permission According Extension with Find

We can specify the file extension we want to change the permission to the find command. In this example we will look directory /opt/lamp and change permission of .c extension files to the 660 .

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/set-permission-folders-subfolders-linux/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  What is File System Block And Super Block?

Leave a Reply

Your email address will not be published.