1834533 Members
2874 Online
110069 Solutions
New Discussion

cp and utime error

 
Elena Leontieva
Esteemed Contributor

cp and utime error

Hi,

When using cp command, the following message is generated, even though it copies the file properly:

cp -p file /directory/xxx
cp: utime failed file: Not owner

Thanks,
Elena.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: cp and utime error

Elena,

What are teh permissions on the file? Maybe permissions are tight.

Also

pwck
grpchk

There may be a consistency problem in /etc/passwd or /etc/group

bdf /

Make sure root fs isn't too full.

Kind of stumped actually, this is what I'd do if it happened to me.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Schulte zur Sur
Honored Contributor

Re: cp and utime error

Hi,

I found this some place else:
utime() failed because I`m the not owner of the file. I have (group)
write permission which is why the copy completed successfully.

And because you are not the owner utime is unable to set date/time of modification.

Check, if this is also your case,

Michael
T G Manikandan
Honored Contributor

Re: cp and utime error

Are u copying files to a NFS mounted file system?

Please revert
T G Manikandan
Honored Contributor

Re: cp and utime error

check Document id: A5571682
Elena Leontieva
Esteemed Contributor

Re: cp and utime error

Hi everybody,

No, this is happening NOT on NFS mount, rather on XP256;

pwck and grpck do not report any problems for that user;

Michael, this is my situation, i.e file permissions are 664 and a user who does a copy is not the owner but belongs to the group;

What is strange though, that on the other server a cp does not give an error even though permissions are 644 and still copies a file;

Thank you for responses,
Elena.
Michael Schulte zur Sur
Honored Contributor

Re: cp and utime error

Hi,

compare the access rights of the two directories the files are in.
can you post an ls -lisa /directory
?
Are you using acl?

Michael