LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2004, 12:06 PM   #1
ujotne
LQ Newbie
 
Registered: Sep 2003
Posts: 13

Rep: Reputation: 0
chown -R


Hi,

I am trying to change the permissions of all subdirectories and files a directory mydir, included all files in all the subdirectorie. The command chown -R mydir don't suffice, as most of the subdirectories and files start with a . and/or contains whitespace. Any suggestions?

Regards
 
Old 02-25-2004, 12:12 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
What version of chown are you using? if I run chown -R username:groupname mydir/ it works on all files... including . files. I just tried it.
 
Old 02-25-2004, 12:19 PM   #3
bnice
Member
 
Registered: Feb 2004
Location: Sacramento, CA
Distribution: Slack 9.1, slackware-current
Posts: 284

Rep: Reputation: 30
to give everyone write permission:

Code:
chmod -R a+w mydir

Edit: this assumes that you *really* want to change permissions, not ownership

Last edited by bnice; 02-25-2004 at 12:22 PM.
 
Old 02-25-2004, 01:02 PM   #4
ujotne
LQ Newbie
 
Registered: Sep 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Yes, you are right, chown -R newowner:newgrp mydir/ does it. That's what I thought I used in the first place, so I must have had a typo (I often do...). Thanks anyway.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chown loopoo Linux - Newbie 5 08-09-2005 10:38 AM
Chown -R Jakeh2k1 Linux - General 3 10-31-2004 05:23 PM
chown issues tsayles21 Linux - Newbie 1 03-30-2004 09:10 AM
chown Sathe Linux - General 13 10-14-2002 12:25 PM
chown? joetec Linux - Newbie 6 04-07-2002 05:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:30 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration