lchown() If you must use chown(), you may instead want lchown() lchown() acts on the link if it's a link Can be used from command line too using the '-h' option: # cd /home/ # mv oldemp newemp/oldemployee_files # cd newemp # chown -h -R newemp oldemployee_files