Operating System - HP-UX
1835035 Members
3527 Online
110073 Solutions
New Discussion

Re: mv: /tmp/test: cannot unlink: Not owner

 
blal
Frequent Advisor

mv: /tmp/test: cannot unlink: Not owner

Hi

I have a file owned by user1. (file not in home dir )

Now user2 is trying to move the file .

Both user1 and user2 are in the same group.
And there is no sticky bits set for the source/dest dir .


The file is having 777 permissions and I am getting the following error

mv: /tmp/test: cannot unlink: Not owner

Is this operation permitted in HP unix ?
If then how can I set this ?


Please help .

Thanks,




Live and let live.
6 REPLIES 6
RAC_1
Honored Contributor

Re: mv: /tmp/test: cannot unlink: Not owner

Is the file a normal file??
What does following return for both users??

id user1
id user2

Now some personal question. IS THAT BAIJU LAL??? IAM ANIL HERE. EMAIL ME.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: mv: /tmp/test: cannot unlink: Not owner

What are the directory permisdsions?

Are these local filesystems or is NFS/automounter in play as well?
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: mv: /tmp/test: cannot unlink: Not owner

777 permissions for a file have nothing to do with the existence of a file. Whether you can move or remove a file completely depends on the directory's ownership, not the file. If the /tmp directory is 777 (drwxrwxrwx which is required for normal operations), then anyone can create, move/rename or remove any file in that directory. If the stickiy bit is set on the source directory, then only the file's owner is allowed to move/rename or remove a file.


Bill Hassell, sysadmin
Fred Ruffet
Honored Contributor

Re: mv: /tmp/test: cannot unlink: Not owner

What are permissions on directory ? isn't sticky bit set ? it is usual on /tmp... let's see a "ls -ld /tmp"

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Suraj_2
Valued Contributor

Re: mv: /tmp/test: cannot unlink: Not owner

Hi

1) Check for the permission
2) Check whether file is a normal file or a link one

Rgds
Suraj
blal
Frequent Advisor

Re: mv: /tmp/test: cannot unlink: Not owner


Thanks Guys,

The parent directory had a ACL set .

Regards,
baiju.
Live and let live.