reflecting permissions to sub directories

Asked by pallavsengupta

Hi

I have a directory pallav , which has permisssions to purticular group.Now when i change the permissions it does not get reflected in all sub directies and all files taht are in the parent directory pallav.

so how to go about that !!!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Hello

Each file or directory can have permissions for the owner (user), for the group and for the others.

The permissions are stored in three triplets. Each triplet describe the read, write and execution permissions for the user, the group and the others.

So, rwxrwxrwx means read, write and exec permissions for everyone. rwxr-x--- means read, write and exec for user, read and exec for the group and nothing at all for the others.

If you want to change the permissions you use chmod. You can use u for users, g for group, o for others, + or - to add or subtract permissions and = to set them on an absolute manner.

You can also set them using numbers. 4 is read, 2 is write, 1 is exec, sum them up and you get the permissions you want for u, g, or o. Then you put them all together and you have the thing. so use chmod 777.

chmod 777 is rwx for all.
chmod 750 is rwxr-x---
chmod 644 is rw-rw-rw-

You get the idea.

Note that x is needed if you want to access a given directory, so, beware of that when using chmod -R to change permissions recursively.

More info:

http://linuxcommand.org/lts0070.php

Regards

Bhavani Shankar.

Revision history for this message
pallavsengupta (pallav-s-gupta) said :
#2

Dear Bhavani

thanks again, but i have alraedy gone through this documentation.See when i change the permissions for directory pallav , the files and sub-directories in that directory should also reflect the same.but this is not happening in my case.I have to enter that directory and then change the permissions on each file one by one.

So is there something which can change permisssions on directory as well as files in that directory.

I hope you understood !!

Revision history for this message
Bhavani Shankar (bhavi) said :
#3

Ok thats one way or you can use chown command to change the owner and chgrp to change group permissions

Here is a nice video

http://www.leechvideo.com/video/view543239.html

Regards

Bhavani Shankar.

Revision history for this message
Murali Krishna Marimekala (murali-marimekala) said :
#4

Hi pallavsengupta,

Did you try $sudo chmod -R 777 pallav

pallav - your directory .

-Murali-

Can you help with this problem?

Provide an answer of your own, or ask pallavsengupta for more information if necessary.

To post a message you must log in.