chmod is the command and system call, in Unix-like operating systems,which may change the access permissions to file system objects (files and folders).
chmod 755 /var/example/
will set 755 (drwxr-xr-x) on /var/example/
chmod -R 755 /var/example/
will set 755 (drwxr-xr-x) recursively on /var/example/ and his content.
Want to know more about chmod ?
Take a look on wikipedia.org / Chmod or, on you system
How to know the rights of file or a folder ?
Use the ls command.
ls -l /var/list all files and directory in /var/, the -l is to show rights, weight (...) and others informations.
Take a look on the help or the manual for more informations (RTFM).
This tools is really complete ?
can there be more than 3 digits ?
Yep, there may be one other digits coming first, like 755 become 0755. Depends of sticky, SUID -setuid- and GUID -setgid-, take a look on the next point of this FAQ.
There is some other letters than xrc ?
Yep, there may be other letters when you look at the rights of your files and folders.
The first letter, other than -
d---------is for a Directory.
l---------is for a symbolic Link.
c---------is for a Character special file.
b---------is for a Block special file.
p---------is for a FIFO (Pipe).
s---------is for a Socket.
---------TSticky Bit, short story, this right disallow any right to delete a file, wathever the parent directory rights, if the user who want to delete the file is not root or the owner of the file. wikipedia.org / Sticky_bit.
------S---are about SUID -setuid- and GUID -setgid-, this are some specifics rights allowing to "bypass" some rights with the rights of a the owner or the group. Take a look at wikipedia.org / Setuid for a better explanations.