Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th September 2008, 06:54
dealspiggy dealspiggy is offline
Member
 
Join Date: Mar 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to chmod php files without chmod subdirectory?

When there are several layers of subdirectories in a main subdirectory (e.g. main/subdir1/subdir2/subdir3/) and each subdirectory has many php files, I wonder how to chmod those php files to 644 without chmoding subdirectories?

chmod -R 644 main ?? But this also chmod subdirectories to 644, how do I add a condition to this chmod ?
Reply With Quote
Sponsored Links
  #2  
Old 5th September 2008, 08:14
daveb daveb is offline
Senior Member
 
Join Date: Dec 2006
Location: St Louis Mo
Posts: 272
Thanks: 43
Thanked 41 Times in 37 Posts
 
Default

To chmod all your files below a dir to 644 use this:
Code:
find /path/to/dir/ -type f -print0 | xargs -0 chmod 644
if you want to chmod all sub dir below a dir to say 755 try this
Code:
find /path/to/dir/ -type d -print0 | xargs -0 chmod 755
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26
File Permissions demonize Installation/Configuration 0 26th June 2008 20:11
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 10:20
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 14:22
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 11:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.