I'm user1 and I created the user.file file, so I'm the owner of this file. I would like to change the owner of this file with the chown
command as follows:
$ chown user2 test.file
chown: changing ownership of 'test.file': Operation not permitted
If I'm logged in as root the command work perfectly. Why can't I change the ownership when logged in as the file owner?