The UNIX and Linux Forums  

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



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-04-2007
narrok narrok is offline
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
Remove advertisements
!!
Forum Sponsor