LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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 Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:21 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
Open Source Consulting | Domain Registration