University | Singapore University of Social Science (SUSS) |
Subject | ICT246: Operating Systems |
Question 3
Implement system security and access control in Linux operating system.
Using Ubuntu OS, write and implement ONE (1) bash shell script (only one script should be written for whole Question 3). Use the root account to execute the script. The script will be executed with no arguments, and it can be executed in any folder.
Hire a Professional Essay & Assignment Writer for completing your Academic Assessments
Native Singapore Writers Team
- 100% Plagiarism-Free Essay
- Highest Satisfaction Rate
- Free Revision
- On-Time Delivery
The bash shell script should have the following specifications:
Part (a)
1. The script creates a file ‘tma2024.txt’ in the current folder and write the following two words in the file, where x is 1 initially.
line x
If the file exists, it will prompt a message to the user on entering a word ‘append’ and press enter to append the two words in the file.
2. If the user does not enter ‘append’ and press enter, the script will display “user not enter ‘append’” and the script will proceed to part (b).
3. If the user enters ‘append’ and press enter, the script will display the last line of “tma2024.txt”.
If the last line does not contain “line x”, it will display “incorrect two words format”. The script will then proceed to part (b).
Example, if the last line contains “hello world”, then the script will display “incorrect two words format”.
If the last line contains “line x”, it will display “correct two words format”, increment x by 1 and append “line x” to file “tma2024.txt”. The script will then proceed to part (b).
Example, if the last line contains “line 5”, then the script will display “correct
two words format” and append “line 6” to file “tma2024.txt”.
Part (b)
4. The script will then display the permissions of the file ‘tma2024.txt’ in the following
format.
tma2024.txt permissions [file permissions] size [file size in bytes]
Example of display: tma2024.txt permissions -rw-rw-r– size 71
5. It will change the permissions of the file ‘tma2024.txt’ according to the file size.
– If the file size is less than 50 bytes, remove the write permission from group.
– If the file size is between 50 bytes and 100 bytes, change the permission to
owner can read, write and execute, whereas all others can only read.
– If the file size is more than 100 bytes, add the execute permission to owner and group.
6. It will then display the current date in the format of MM#DD#YYYY.
Stuck with a lot of homework assignments and feeling stressed ? Take professional academic assistance & Get 100% Plagiarism free papers
Part (c)
7. The script will then list all the files with the extension of .rpt (assume that .rpt is a text file) in the current folder.
8. It then prepends a # in front of all the lines in the .rpt files.
9. It then appends itself to the .rpt files (it means your bash shell script content is written to each of the .rpt files). If the .rpt file has been appended by your bash shell script before, it should not append to the .rpt files again, and it will instead print out a message to alert the user.
10. It then adds the execute permission to the .rpt files for everybody. Note that the .rpt files that are appended by your bash shell script will be able to execute exactly as your bash shell script.
11. Validation check needs to be done in the bash shell script whenever possible (e.g.
appropriate message should be shown and the script will exit if there is no .rpt files in the current folder)
Part (d)
A documentation (with appropriate screenshots and explanations) needs to be produced on the execution of the bash shell script with different conditions (e.g. on whether user enter ‘append’ and press enter, different file size of file ‘tma2024.txt’, etc.). Appropriate checking needs to be done (e.g. checking the size of file ‘tma2024.txt’, checking the content of file ‘tma2024.txt’, etc.)
Appropriate comments should be added in the script to make it easier to understand.
Buy Custom Answer of This Assessment & Raise Your Grades
Empower your understanding of ICT246 Operating Systems with our essential services: assignment helper online and specialized Coursework Writing Services in Singapore. Singaporean students can now invest in our expert assistance to ensure a comprehensive grasp of operating systems concepts.
Looking for Plagiarism free Answers for your college/ university Assignments.
- NUR 3015 Reducing Mental Health Issues Assignment Report: Policy Brief for Community-Based Interventions in Singapore
- DSWSH MC2 Electronic Security Assignment: Protection in Depth Plan for American International School (AIS) Singapore
- 6WBS0035/6 Digital Strategy Presentation Assignment: MNC Innovation Proposal for Global Growth
- PS6004EFA Project Assignment : Individual Research-Based Dissertation on Business and Management Topics
- Principles of Management Assignment 3 Report: Strategic & Ethical Analysis of MNC or SME Company
- Project Management Assignment: 1-Day Corporate Sports Tournament Planning
- Managing Across Cultures Assignment 2: Case Studies on McDonald’s, Fiat & Workplace Stereotypes
- WEB301 Green Plan 2030 TMA Report: Engaging Singapore’s Youth for a Sustainable Future through Online & Offline Communication Strategies
- Serial Position Effect Assignment: Quantitative Psychology Study on Memory Recall
- Corporate Counterintelligence Assignment: Strategies to Protect Internal Data in Asian Business Environments