As I am getting my feet wet with more and more sysadmin stuff, which is pretty fun for me, I’m gonna take a second and record the tricks that I know are going to be useful long term, like the “Auto fix for file permissions and ownership” script. Tim pointed out that often the errors you get after moving over someone’s files are related to ownership and permissions on that specific user’s account. He showed me a quick way to automatically re-write the permissions for all files to be 644 and folders 755 (the standard, as I have come to learn) for just that account.
Through terminal, you wget the script from Github:
Then run the following command where USER-NAME is the username for the account you are changing file permissions for.
sh ./fixperms.sh -a USER-NAME
It worked a charm, and now I have blogged it here and tagged it sysadmin, which will be where I start to store some of these tricks until they become more familiar.