Sharing violation in the attached snippet means the file was opened by someone else and a lock prevented the requested operation from occurring
To check which client is locking it, utilize the vserver locks show command. Once the lock is revoked by the client, the desired operations will be permitted.
Note : ONTAP does not have a feature to lock a file and it is actually the application hosted on the client which can lock a file. hence, It is the applications/clients responsibility to revoke the lock.