Professional Documents
Culture Documents
LinuxG.net
The Linux and Unix Geekster!
Linux Geekster About Post List Zero Viruses The Cookie Policy Privacy Policy
Contact
1 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
Permissions can be set in the octal mode (with digits), or with letters.
In this article, we will change the file and folder access rights in the human readable representation with
chmod.
In Linux and Unix systems, the file and folder permission permissions are:
read permissions: r
write permissions: w
execution permissions : x
Structured in u g o format:
u = user
g = group
o = others
The user is the owner of the file or directory, the group is the group that owns the file or directory
and the users that do not belong to the owner group are the others.
The generical tool for displaying the permissions is ls -l . But I prefer to use stat.
$ ls -l /etc/motd
lrwxrwxrwx /etc/motd
The red characters represent the permissions for the user, the green characters represent the access
rights for the group and the blue ones for the others.
The chmod command is used for changing the file and folder access rights. The plus + sign adds
2 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
$ ls -l
Add read write for the user, exec write for the group:
Add read write for the user and group and x for the others:
3 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
Set read and write for the user, read and exec for the group and write for the others:
These commands can be combined one with another, to serve your needs.
$ chmod -R u-x,g-x,o-rwx
$ chmod u+X *
Related Posts
How to set the SetUID and SetGID bit for files in Linux and Unix
4 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
‹ How to manage background and foreground jobs How to replace one string with another in a file ›
Tagged with: change file permissions, chmod, linux, the chmod command, unix
Posted in The Linux and Unix Articles!
5 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
Leave a Reply
Your email address will not be published. Required fields are marked *
Comment
Name *
E-mail *
Website
Post Comment
6 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
search here … Go
Subscribe
Subscribe
Recent posts
How To Install Deluge 1.3.15 on Ubuntu 18.10,
Ubuntu 18.04 And Derivative Systems
How To Install qBittorrent 4.1.4 on Ubuntu
18.10, Ubuntu 18.04 And Derivative Systems
How to Install Transmission 2.94 on Ubuntu
18.10, Ubuntu 18.04 And Derivative Systems
How To Install Kernel 4.20 RC6 on Ubuntu
How To Install SeaMonkey 2.49.4 on Ubuntu
18.10, Ubuntu 18.04 And Derivative Systems
How To Install WhatsDesk (WhatsApp Client)
On Ubuntu Via Snap
How to Install And Use Franz (WhatsApp,
Slack, Discord, Telegram client) on Ubuntu
7 of 8 21/12/2018, 9:00 AM
How to change file and folder permissions with ... http://linuxg.net/how-to-change-file-and-folder-pe...
Tags
canonical centos debian debian wheezy deepin
deepin 2014 elementary os
elementary os 0.2 elementary os 0.2 luna
elementary os 0.3 fedora kernel linux
linux lite linux lite 2.0 linux mint
linux mint 13 linux mint 14
linux mint 15 linux mint 16
linux mint 17 linux mint 17.1 linux news
lxle lxle 14.04 mageia news openmandriva
opensuse pear os pear os 8 peppermint
peppermint five pinguy os
pinguy os 14.04 ubuntu
ubuntu 12.04 ubuntu 12.10
ubuntu 13.04 ubuntu 13.10
ubuntu 14.04 ubuntu 14.10
ubuntu 15.04 ubuntu touch unix
© 2018 LinuxG.net
8 of 8 21/12/2018, 9:00 AM