
Installing and setting Nginx as a web server. Securing Apache with Let's Encrypt (Certbot). Installing the Network File System (NFS).
Setting permissions on files and directories. Managing passwords and password policies. Step 12 : If we would like to change the group assignment to the object, we would follow the following syntax: sudo chown -R ubuntu:www-data mydir Step 11 : We can also use the -R flag to change ownership of the directory itself, as well as all the files and directories it may contain: sudo chown -R ubuntu mydir Step 10 : if we wanted to change the owner of a file, we could do the following: sudo chown ubuntu mydir/test1.txt Step 8 : To change all the directories to 755 find mydir/ -type d -exec chmod 755 \ Step 7 : If you wanted to change the permissions of a directory, the -R option changes recursive, meaning that you'll not only make the changes to the directory chmod 777 -R mydir This is the same as -rw-ħ70 : Both user and group have read, write, and execute. Here are some examplesĦ00 : User has read and write (4+2). We repeat this for each column (User, Group, and Other) to come up with a string of three numbers. Step 6 : For example, if we add Read and Write, we get 6. Each of the permission bits (r, w, and x) have their own octal equivalent, as follows: This is actually the most common method of altering permissions.
Step 5 : You can also use octal point values to manage and modify permissions. The chmod command using this method consists of at least three parts from the following lists: Access class Operator Access Type u (user),g (group),o (other),a (all) +,-,= r, w, xĮx : we're removing the r bit from other chmod o-r test1.txt Step 4 : To change permissions on an object, we will use the chmod command. Files Directories r The file can be read The contents of the directory can be viewed w The file can be written to Contents of the directory can be altered x The file can be executed as a program The user or group can use cd to go inside the directory To change permissions Group : This refers to the permissions that apply to the group that owns the file.Īll users : This refers to the permissions that apply to all other users that owns the file. User : This refers to the permissions that apply to the user that owns the file. Object type : - (file), d (directory), l (link) Step 3 : Each permission string can be broken down into four groups, as I'll show you in the following table Object type User Group All users - rw- r- r. Step 2 : In each line, we see several fields of information.ħ : The name of the file The permission strings Step 1 : Use the ls command to list the access permissions of files and directories.