How do you change permissions on a directory of file?

Answers were Sorted based on User's Feedback



How do you change permissions on a directory of file?..

Answer / gokul pradeep

To give permissions

chmod 777 /dir/files

it gives full credentials to that specified files.

Is This Answer Correct ?    5 Yes 0 No

How do you change permissions on a directory of file?..

Answer / 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

How do you change permissions on a directory of file?..

Answer / gaurav kumar

If we will create the directory(india) and create the file
in the directory(delhi) then we will run the command.
#chmod -R 666 india/delhi
So permession has been changed both dir and file's
permission will same.

Is This Answer Correct ?    1 Yes 0 No

How do you change permissions on a directory of file?..

Answer / mahendra

dependence on file user type

chown root /dir
chmod 777 /dir
chgrp root /dir

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Linux General Interview Questions

Hi, We are porting our application from linux 2.4 to 2.6.Its an medical equipment.So just want to know how could i perform balck box testing on this.Please let me know the scenarios as well.

0 Answers  


Explain the two modes of nslookup?

0 Answers  


How to setup password less remote login/ssh?

0 Answers  


How Many People Use Linux?

2 Answers  


How can you view a file?

5 Answers  






What do you mean by ldconfig in linux?

0 Answers  


Why should you avoid telnet to administer a linux system remotely?

0 Answers  


Which transistor is used in each cell of eprom?

0 Answers  


Why red hat linux is not free?

0 Answers  


What daemon is responsible for tracking events on your system?

0 Answers  


What is the difference between linux and redhat?

0 Answers  


How do I find com ports in linux?

0 Answers  


Categories