You are not logged in.
Pages: 1
Hi,
How can I set permissions to all the files in a directory and it's sub directories for owner only read+write, leaving the directories with execute?
Because if I just chmod -R 600 the directories dont get execute permission so i cant access the files inside.
Any ideas?
Thanks.
Offline
checkout
chown
Offline
find . -type f -exec chmod 0600 {} ;
Offline
thanks elastic, that worked
Offline
would...
chmod go-rwx -R directory
work right?
Offline
I don't think so, wouldn't that also change the sub directories permissions, not just files?
Offline
elasticdog's way is how I'd do it... "find -type f" is about the only way I know to narrow that stuff down... besides some complex scripting of "ls -F" and grep "/$"... /me shrugs
Offline
Pages: 1