Monday, March 2, 2015

Reset only first level folder permissions

I had a requirement to reset all the home folders permission of FTP users to 750 (To disable Read/Browse permission to 'other' users).

Let's assume the FTP home folder structure is as follows: /ftp/home/<ftpusers> and the syntax to reset the folder permission would be :

# find /ftp/home -maxdepth 1 -type d -exec chmod 750 {} \;

Note: Using -maxdepth 1 wouldn't allow the find command to recurse though sub-folders.

1 comment:

  1. Really a wonderful post! I like it very much. I Have a site A Creative Web Design & Hosting Company where you can find more information regarding this topic like as web-design, domain-registration, web-hosting and many more. Thanks for your post, You can put up your queries or suggestions below.