The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Newbie, Directories permissions sypherz Linux 3 04-22-2008 11:14 AM
Need help in changing Permissions to 775 for files and directories ranga27 Shell Programming and Scripting 1 01-16-2008 05:40 AM
How to change default permissions on new files rdgblues UNIX for Dummies Questions & Answers 1 08-30-2006 02:56 AM
Change permission for directories and files mingfei2006 Shell Programming and Scripting 1 08-23-2006 04:00 AM
Permissions for Directories and Subdirectories clancymf UNIX for Dummies Questions & Answers 1 08-07-2006 03:40 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2007
Registered User
 

Join Date: Jun 2007
Posts: 4
how to change permissions only to files, not directories....?

Hi,

I am really new to unix, any help is much appreciated.

I need to change permissions of all files under several subdirectories to 700 but keep directories readable (755). Why ? Because I need a FTP user to only list his files and can't read them. But to browse to subfolder, the directories must be readeable.

Something like:

"find . -type f" (list only files) >> then "chmod 700" (chmod the printed files)

or

"ls -l | grep -v "^d" " (list non directories) >> chmod 700

I don't know how to do it. Please any advice ?

Thank you!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-04-2007
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,513
Code:
find . -type f -exec chmod 700 {} \;
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0