DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
Unix Shell Scripts
«Prev
Next»
Shell Programming
Shell Programming
Unix Shell Available
Determining Unix Shell
Shell Scripts Unix
Interpreted Compiled Programs
Understanding Scripting Options
Cmpiled Programs
Shell Components
Shell Script Macro
Built in Components
Input Output Tools
Shell Script Tests
Script Variables
shell-script-control-structures
Regex Define Patterns
Shell Program Components
Writing First Script
Interactive Shell Script
Defining Script File
Using Text Editor
Read Input Command
Including Comments Scripts
Setting File Permissions
Running Command Line
Working With Variables
Command Line Arguments
Using Positional Variables
Predefined System Variables
System Variables
Environment Variables
Syntax Affects Interpretation
Using Strings Variables
Using Numbers-inVariables
Performing Math Variables
Using Array Variables
Scripts Variable Summary
Designing Scripts
Script Objective
Script Flow
loop Tests
Checking Commands
error Trapping
Making Script Portable
Documenting Script
Designing Shell Scripts
Setting File Permissions - Exercise
Setting Shell Script file Permissions
Objective:
Use the chmod command to set file permissions on a script file.
Exercise scoring
This exercise is worth 2 points.
Background/overview
You should have an account set up on the DispersedNet Labs server or on a UNIX server at your site. Log in to this account so you see a UNIX command line prompt. You will be working with the filename “welcome” that you created in the last exercise.
Instructions
Log in to your UNIX account so you are working at a command prompt.
Use the
ls
command to view the current file permissions of your script file by entering the following line:
% ls –l welcome
Use the
chmod
command to add the Execute permission to your script file by entering the following line:
% chmod u+x welcome
Use the
ls
command again to check that the Execute permission has been added by entering the following line:
% ls –l welcome