Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
2  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.