hankknight
asked on
Changing Permissions Recursively
Hello,
I have a directory with dozens of sub-directories and hundreds of files.
Some files have the ownership set to "nobody" and some have the ownership set to "dev".
How can I change ownership for ALL "dev" to "prod", for ALL files and directories, and for both the user and the group?
Thanks.
I have a directory with dozens of sub-directories and hundreds of files.
Some files have the ownership set to "nobody" and some have the ownership set to "dev".
How can I change ownership for ALL "dev" to "prod", for ALL files and directories, and for both the user and the group?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
->> First of all, determine the numeric user id of "dev"
How do I determine the numeric user id of "dev"?
->> First of all, determine the numeric user id of "dev"
How do I determine the numeric user id of "dev"?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
chown prod /home/mydir/* -R
chgrp prod /home/mydir/* -R
But it change ownership of ALL files, even ones that were owned by "nobody". I ONLY want to change ownership where it was set to "dev"