LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   File Ownership (https://www.linuxquestions.org/questions/linux-general-1/file-ownership-381686/)

chrisfirestar 11-10-2005 01:48 AM

File Ownership
 
Hi everyone,

I have heard their is a command that we can run on a folder that will ensure that all files created within that folder (and hopefully any recursively) will be in the assigned owner/group. Any ideas?

Your help would be appreciated :)

Thanks
Chris

pritchardtom 11-10-2005 03:21 AM

you can use a -r command with chmod to recursively change all files in a folder to a certain permission. So it would look something like :

chmod -R u+rwx /home/name/someDir/

In future learn to read the man pages, Typing man chmod got me that result in an instant, so that may help you get a quicker answer in the future.

spooon 11-10-2005 04:41 AM

and to change ownership use "chown"; and you can do it recursively as:
Code:

chown -R user:group foo
where foo is the files / directories you want to change ownership of.


All times are GMT -5. The time now is 04:10 AM.