Changing access permissions using the chmod command (2024)

1. To give yourself permission to execute a file thatyou own:

 chmod u+x file1

This gives you execute permission for the file "file1".

2. To give members of your group permission toread a file:

 chmod g+r file2

This gives the group permission to read the file "file2".

3. To give read permission to everyone for aparticular type of file:

 chmod a+r *.pub

This gives everyone permission to read all fileswith the extension .pub.

4. To give the group write and execute permission:

 chmod g+wx $HOME/SCCS

This gives all members of the group permission to placefiles in the directory SCCS in your home directory. Theycan also list (ls) the contents of this directory.

Changing access permissions using the chmod command (1)Top documentChanging access permissions using the chmod command (2)
Changing access permissions using the  chmod  command (2024)
Top Articles
Latest Posts
Article information

Author: Tyson Zemlak

Last Updated:

Views: 6378

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Tyson Zemlak

Birthday: 1992-03-17

Address: Apt. 662 96191 Quigley Dam, Kubview, MA 42013

Phone: +441678032891

Job: Community-Services Orchestrator

Hobby: Coffee roasting, Calligraphy, Metalworking, Fashion, Vehicle restoration, Shopping, Photography

Introduction: My name is Tyson Zemlak, I am a excited, light, sparkling, super, open, fair, magnificent person who loves writing and wants to share my knowledge and understanding with you.