How do you change permissions on a directory of file?
Answer Posted / bhaskar
To change permission on a file we can use chmod command.
Only thing to remember that to change a file permission one
must be the owner of that file or root in that system.
the typical format of chmod is
chmod <permissions> <filename(s)>
e.g. chmod +777 examplefile
The above command will provide read, write and execute
permission to all in the file examplename.
value for read is 4
write is 2
execute is 1
now to give all permissions it becomes 4+2+1=7
first digit refers to the permission of the owner.
second digit refers to the group permission and last digit
refers to permission to all
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is redirection?
Boot sequence of linux on embedded platform
What is the root account?
Is pfsense an os?
What is a .sh file linux?
Will steam run on linux?
What are scripts in linux?
What is a shell program in linux?
Is mac a posix?
What is wait () and notify () in multithreading?
What is an a record, an ns record, a ptr record, a cname record, an mx record?
which are the configuration files associate with dns server and client in linux operating system?
What does nslookup do?
How documentation of an application is stored?
What are the different types of files in linux?