cp command issue.

All,

I have files in directory,when i try to overwrite those files it gave operation not permitted error. I am using same group user (ina2) while overwritng this file.

Sample file :
-rw-rw-r-- 1 ina1 indev 316 Jun 06 13:44 ONCTEST.dat

Error:
cp: /proj/out/ONCTEST.dat: Operation not permitted.

Thx,
Sai

You also need group write access to the "out" directory.

I found the issue,-p in cp command causing this problem.I tried copying file without -p and it works fine. It didn't allow even same group user if u use -p in cp command.

cp -p filename2 filename2 - Operation not permitted
cp filename2 filename2

Sai,
Why are you trying to copy a file to itself?

cp -p filename2 filename2 
cp filename2 filename2

same file will be in different location,i have to cp latest file to other folder(overwrite) every month. I resolved that issue,see my reply. Thanks.