write-protected regular file caused cp failed

Found issue below on linux box:

[oracle@testvm ~]$ cp /tmp/stbeehive.cer /u01/shared/
cp: cannot create regular file `/u01/shared/stbeehive.cer': Permission denied

And /u01/shared was 777 permission, and /tmp/stbeehive.cer below:

[oracle@testvm ~]$ ls -l /tmp/stbeehive.cer
-r-xr-xr-x 1 oracle oinstall 1930 Sep 12 06:37 /tmp/stbeehive.cer

After some troubleshooting, it's found the dest file /u01/shared/stbeehive.cer was already there (without write permission)

[root@testvm ~]# ls -l /u01/shared/stbeehive.cer
-r-xr-xr-x 1 oracle oinstall 1930 Sep 12 06:36 /u01/shared/stbeehive.cer

And after removing the dest file, then cp went good

[oracle@testvm ~]$ rm /u01/shared/stbeehive.cer
rm: remove write-protected regular file `/u01/shared/stbeehive.cer'? y

[oracle@testvm ~]$ cp /tmp/stbeehive.cer /u01/shared/

Good Luck & Best Wishes