Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there anyway for another user to change permissions of file without root permissions? If another user has access to my drive and they can theoretically change the user bit in the file via a binary or hex editor, could they change the permission?

share|improve this question
To change permissions you need to be either root (uid 0) or be the owner of a file. – Hennes Jan 24 '13 at 20:34
up vote 2 down vote accepted

The ownership and permissions are not stored in the file, but in the file system, which in turn lies on the hardware storage device (usually). Non-root users do not have access to the raw file system data / raw block device for obvious reasons, to prevent exactly this. If the file is on a removable storage medium which the other user can physically access, he can obviously just connect it to his computer, log in as root on his computer, mount the medium, and chmod/chown the file.

share|improve this answer
Great explanation, thanks! – agz Jan 24 '13 at 23:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .