While I don't know how to specify different permissions on files vs. directories as you are doing, you can apply file permissions recursively using:chmod -R 0644 *
File ownership can be set recursively using:chown -R user:group *
Yes thanks, I did know that but couldn't suss changing the directory permissions recursively
changing permissions recursively is not a good idea..
what are you trying to do?
I realised that. I am having a play with Unison file synch to synchronize various bits of data across two servers. I was trying to realign permissions across a range of directories so that they showed the same permissions pre-synch. Because of various historical issues, there are a lot of identical files with different permissions........
A couple of oddities arose :
One of my servers shows files/directories owned by 'user:
local' and the other by 'user:
shared'
Any one have any ideas about why this occurs ?
Second thing that cropped up was that my windows boxes suddenly started to read & write files as user:user so I must have screwed something somewhere.
I got out of it by going into server manager and changing the user-access to group/group and back to group/everyone
That seemed to sort it out.
Hmmm. Back to the drawing board !
I got out of it by changing the permissions on the ibays.
Thanks for the tips. Anything else gratefully appreciated !