LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-31-2005, 04:30 PM   #1
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Rep: Reputation: 15
chmod whole directory


how do you chmod all the files in a directory to just say 755?
 
Old 08-31-2005, 04:40 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
cd ~/mydirectory
chmod 755 *

This will change the permissions on all files and directories in ~/mydirectory to 755. It will not recursively affect anything inside the subdirectories.
 
Old 08-31-2005, 04:42 PM   #3
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Original Poster
Rep: Reputation: 15
what if i want to change all the permissions on all the subdirectories?
 
Old 08-31-2005, 04:46 PM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I think you can use

$ chmod -R 755 /path/to/directory
 
Old 08-31-2005, 04:47 PM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
Then use the -r option to recursively change everything within also. e.g.

cd ~/mydirectory
chmod -r 755 *

If you want to change the permissions on the directory itself also, it's more convenient to do it from the parent directory:

cd ~
chmod -r 755 mydirectory
 
Old 08-31-2005, 04:57 PM   #6
waynejkruse10
Member
 
Registered: May 2005
Posts: 56

Original Poster
Rep: Reputation: 15
thanks for your help.

Wayne
 
  


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
chmod directory help ycamera2mank Linux - Software 3 10-03-2005 11:43 PM
What effect has chmod 222 on a directory? JZL240I-U Linux - Software 11 09-13-2005 05:23 AM
Cannot set chmod for directory to 777 or 666 q.sa Linux - Software 6 07-19-2005 09:36 AM
did chmod 666 on a directory but it doesn't work r3dhatter Linux - Newbie 6 06-10-2005 10:06 AM
chmod for a group on a certain directory? mfeoli Linux - Newbie 1 02-10-2004 05:13 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration