Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
3. The Linux permissions model
  


Introducing chmod page 8 of 23


chown and chgrp can be used to change the owner and group of a filesystem object, but another program -- called chmod -- is used to change the rwx permissions that we can see in an ls -l listing. chmod takes two or more arguments: a "mode", describing how the permissions should be changed, followed by a file or list of files that should be affected:


$ chmod +x scriptfile.sh

In the above example, our "mode" is +x. As you might guess, a +x mode tells chmod to make this particular file executable for both the user, group and for anyone else.

If we wanted to remove all execute permissions of a file, we'd do this:


$ chmod -x scriptfile.sh

Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact