Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I have a file "test" on an Ubuntu system owned by the root. The ls -l option is shown below.

$ ls -l test
-r--r----- 1 root abacus 373 Nov 12 19:19 test

I know that only the owner of a file can change its permission. But I want to know whether there is any way to read the contents of the file for an anonymous user.

share|improve this question

migrated from Mar 26 '13 at 6:08

This question came from our site for professional and enthusiast programmers.

You can look into sudo, setuid, and setgid to keep the ownership as root, but allow people to read it. – Jess Mar 26 '13 at 1:16

No. As it is any anonymous reader can not read the files contents.

Right now the only people able to read the file are:

  • People with uid 0.
  • The owner. In this case the user called 'root', which is probably the same as the uid 0 user.
  • All people in the group 'abacus`. (Check /etc/groups to see who is in that group).

Then there is a category of people who are not in that group and who are not the owner. For these the file is set to unreadable. You can change that with chmod o+r test or with chmod +r test. (The latter sets it for all three in {user:group:other}).

All of this assume no additional ACLs (e.g. SElinux) are applied.

share|improve this answer

Yes, you can add o+r, meaning, others can read:

chmod o+r test
share|improve this answer

Your Answer


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.