Thursday, May 15, 2014

global linux perms change

 Wholescale ownership change  
 So you need to change the gid on all files owned by user. Do the following as root:  
 find / -uid 1500 -gid 100 -exec chown 15038:101 {} \;  
 A breakdown is as follows:  
 find / -uid 1500 -gid 100 -exec chown 1500:101 {} \;  
 ^  ^   ^    ^    ^  
 |  |   |    |    |  
 |  |   |    |    |   
 |  |   |    |    |  
 |  |   |    |    do this chown userid:new group {all files found}  
 |  |   |    |  
 |  |   |    user's primary group  
 |  |   |  
 |  |   userid  
 |  |  
 |  filesystem  
 |  
 command  

No comments: