rm/mv command - not owner

Hi,

I have two users, either of them can create a file. Either of them should be able to move/remove the file.

When trying to do that I am getting error "Not owner".

I have many times seen that we could "rm" or atleast "mv" even if the user is not the owner of the file.

Does this have anything to do with the groups assigned to users that sometimes we are able to execute mv/rm and sometimes not.

Thanks

Have a read of this:

unix-file-permissions

it actually has nothing to do with file permissions.

it has only to do with the owner/group permissions on the directory.

In order for 2 users to be able to delete the same file,
the directory permissions, should be:

775

For ANYONE to delete the file, the dir permissions should be:

777

( chmod 777 . )