Saturday, 1 February 2014

Chown Error: Operation not permitted



I'm taking a Red Hat course/module soon (RHA030) and I was playing around with the chown command. If you're not familiar with the command, it is an abbreviation of change owner/ownership and does what it says on the tin - lets you change the owner of a file. I'm sure you know how to run it, or else you wouldn't see this error message: 'Operation not permitted'.

I was actually working on a Macbook Pro on OS X Mavericks when I received the error. I had a file with the following permissions:


-rw-r--r--  1 simon  staff  455 25 Jan 15:05 file.rtf

(Please note, you must run the command as root otherwise you'll get this error: 
chown: file.rtf: Operation not permitted)

Once I ran the command as root, it asked for a password. I didn't have a password on my account, so I hit enter and received the error:

chown: file.rtf: Operation not permitted

This error can be fixed by simply giving your root account a password. Once done, I could run the command and change owner/group without any issues. I've read online that other people had issues and solved it by other means; but this may help someone out there.

Thanks for reading!





No comments:

Post a Comment