1

With this command I can set all file and folder in "img" to 0775:

chmod 775 -R /var/www/site.com/img/  

But would I like change only the file inside the folder img; how can I do? And for change only the folders?

Thanks

Henry8
  • 266
  • 3
  • 8
  • 25
  • I find the solution [here][1]. Thanks [1]: http://stackoverflow.com/questions/3740152/how-to-set-chmod-for-a-folder-and-all-of-its-subfolders-and-files-in-linux-ubunt/11512211#11512211 – Henry8 Oct 09 '13 at 16:21

1 Answers1

2

ok,

To recursively change dirs or files rights

find /root/path -type d -print0 | xargs -0 chmod 755 
find /root/path -type f -print0 | xargs -0 chmod 644
Romain
  • 451
  • 4
  • 13
  • Thank; inside of folder "img" there are more others folder; I would like to change only the folders (files set to 644 and folder set to 755) can you help me? – Henry8 Oct 09 '13 at 15:17