What Does “chmod +x” Command In Linux and Unix?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/chmod-x-command-linux-unix/
PINTEREST
PINTEREST
INSTAGRAM

chmod  is very useful tool to manage file modes like read write execute. One of the most used option for chmod is +x which stands for execution rights. In this tutorial we will look different use cases for user or owner, group and others roles.

List Current User and Group Of A File

We generally need to know given file current user and group. We will use ls  command with -al options in order to list this information.

List Current User and Group Of A File
List Current User and Group Of A File

Change File Mode For The User

We can use u user before the plus in order to enable user execution right of the given file. In this example we will enable user execution of file app.sh

Change File Mode For Group

We can use g group before the plus in order to enable group execution right of the given file. In this examples we will enable group execution of file app.sh

Change File Mode For Other

Others is special group which covers all users in a Linux system. We can enable the execution right of the all users in a file with o like below.

Change File Mode For All

In some cases we can see the +x  without a definition. This is used for all which is equivalent for user , group and others . Alternative is adding a like below.

OR

LEARN MORE  Linux Chown Command Tutorial with Examples To Change Ownership Of Files

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/chmod-x-command-linux-unix/
PINTEREST
PINTEREST
INSTAGRAM