Share via


Unable to chown file from Unix client

 

By default, a user cannot chown a file and make someone else an owner of it. Only root user can successfully run the chown command. But a user should be able to chown a file which is already owned by him. This sound weird as why would anyone want to chown a file already owned by him. On one of my customer’s environment, they are running a job which will delete all the files owned by a particular user. They perform this test by running chown. If the chown fails, then the file will not be deleted and if it is completed successfully, then the file will be deleted. Now the application runs the command

chown <username> *

and for some reason it was failing.

 

Customer is using Microsoft Server for NFS. Upon troubleshooting I discover that he has not given read-write access to any of the machines. Refer to image below.

 

 NFS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I grant read-write access to the machine from which he is running the chown command and it did the trick!