LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-10-2005, 01:48 AM   #1
chrisfirestar
Member
 
Registered: Sep 2003
Location: Adelaide, Australia
Distribution: Fedora/RH
Posts: 231

Rep: Reputation: 30
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
 
Old 11-10-2005, 03:21 AM   #2
pritchardtom
Member
 
Registered: Oct 2005
Location: Swansea, UK
Distribution: Slackware // Mandriva
Posts: 32

Rep: Reputation: 15
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.
 
Old 11-10-2005, 04:41 AM   #3
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file ownership dar28ek Linux - General 4 07-08-2005 08:43 AM
Editing a file changes his ownership? mickor Mandriva 1 03-31-2005 08:49 AM
Apache File Ownership wenberg Linux - Software 2 04-02-2004 09:39 PM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 04:08 PM
file ownership problem Karen61 Linux - General 2 09-29-2003 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration