Question: CHALLENGE: Create the following folder structure inside the existing system folder / opt: / opt enterprise - app bin code docs flags libs logs scripts
CHALLENGE:
Create the following folder structure inside the existing system folder opt:
opt
enterpriseapp
bin
code
docs
flags
libs
logs
scripts
Ensure the user root is the owner of the enterpriseapp folder.
Ensure your regular user account owns all the other folders in the structure except the bin folder which should be owned by the root user
Create the following files:
app.py in the bin folder
stdout.log and stderr.log in the logs folder
README.txt in the docs folder
clean.sh in the scripts folder
pid.info in the flags folder
Set the permissions for the created files as follows:
Anyone can execute the script scriptscleansh
Anyone can read the files inside logs but they cannot be executed and can only be written by the owner your regular account
The file binapppy should have the mode
Create a symbolic link named altappaccess under the structure code folder. The link must point to the binapppy file.
Generate a report file with information about two files:
binapppy
scriptscleansh
Extract the information from the two files mentioned above using the stat command as in the following example:
Listing Example using the etcpasswd File as target:
$ stat c "INODE:n:ietcpasswd
INODE:etcpasswd:
TIP
Look at the stat help
Using redirections save the information in a report file named report.out that must be created inside the docs folder.
The information that must be extracted from the files is the following:
File owner in the format: OWNER::
File octal mode in the format: PERMISSIONS::
File inode number in the format: INODE::
Finally, create the enterpriseappbackup.tar.gz compressed archive file of the optenterpriseapp folder structure and files and save it inside the tmp directory.
TIP
You will need the following commands to complete this task:
touch
mkdir
echo
tree
chown
chmod
cat
ls
ln
stat
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
