Skip to main content
Post Closed as "Duplicate" by terdon
edited tags
Source Link
Michael Mrozek
  • 95.8k
  • 40
  • 245
  • 236

Is Does the chown command is reserved torequire root?

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"chown command as examplefollows:

$ chown user2 test.file chown: changing ownership of 'test.file': Operation not permitted 

If I'm logged in as root login the command work perfectly. Could you explainWhy can't I change the ownership when logged in as the file owner? Thanks

Is chown command is reserved to root?

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 example:

chown user2 test.file chown: changing ownership of 'test.file': Operation not permitted 

If I'm root login the command work perfectly. Could you explain? Thanks

Does the chown command require root?

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?

Post Migrated Here from unix.meta.stackexchange.com (revisions)
Source Link
dubis
  • 1.5k
  • 4
  • 21
  • 34

Is chown command is reserved to root?

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 example:

chown user2 test.file chown: changing ownership of 'test.file': Operation not permitted 

If I'm root login the command work perfectly. Could you explain? Thanks