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

i'm trying to set permissions with chmod in Debian Squeeze.

Its there any way to remove read permission to a single specified user?

chmod u-r file

That seems to deny permissions from the user invokating the command only. Is there a way to specify a user or group?

share|improve this question
up vote 1 down vote accepted

Install acls, that's what you want, if you need to edit rights to specific users without messing up with lots of standard linux groups.

Use mount, to see if there is option acl at your mount points.

Or try running getfacl yourfile, if this works than you are already using acls and you can add rights to more than one specific user by setfacl.

Here you can find nice backround to acls:

share|improve this answer

File level permisions will be tied to owner, group, and world. Unless you want to change the owner of the file (chown), you can't do anything user wise.

The u flag for chmod is actually the owner of the file. You can use g instead to change the group permissions, e.g. chmod g-r file

Alternatively, you can use the numeric mode to change permissions for owner, group, and world all at once.

Relatedly, if you want to only have certain users access the file, you may need to create a new group (groupadd) and then change the group on the file using chgrp.

share|improve this answer

You must log in to answer this question.

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