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 textfile with name negin.txt in /home and did the following:

Right click → Properties → Permissions → Advanced Permissions → Add Entry → Named User user:wwwrun

Is it possible to do this over the shell?

I tried chown wwwrun /home/negin.txt but got no result. What is wrong here?


share|improve this question

migrated from Jul 27 '11 at 9:11

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

up vote 0 down vote accepted

The "Add named user" function uses POSIX ACLs, which can be modified through command-line like this:

setfacl -m u:wwwrun:rw negin.txt
share|improve this answer
I'm so thankful to you,with this I have write and read access? – Nickool Jul 27 '11 at 12:06
@Negin: You already have write and read access, since the file is already owned by the wwwrun user, and this u:wwwrun:rw ACL is pointless. – grawity Jul 27 '11 at 12:08
I appreciate you! you don't know how you helped me!!! thanks!!! thanks!!! very thanks! with your work I have this in advanced my goal was this I hope it will work in my install file too – Nickool Jul 27 '11 at 12:15
well yes but by just calling chown wwwrun I had problem in properties no changes were done but with this facl yes it works – Nickool Jul 27 '11 at 12:19
I tried it:D it works Nice and awesome:) I am so happy! – Nickool Jul 27 '11 at 13:16

Use chown :wwwrun /home/negin.txt to just set the group of the file.

share|improve this answer
Thanks I tried it tells me this in shell:chown: invalid group: `:wwwrun' – Negin Jul 27 '11 at 8:44
@Negin: because there is no such group? – phresnel Jul 27 '11 at 8:47
then why I can set it by going to properties? – Negin Jul 27 '11 at 8:48
@Negin: True. I realise there is a colon in :wwwrun (in the error message). Maybe you typed one to much? – phresnel Jul 27 '11 at 9:00
@phresnel: chown accepts user, user:group, and :group. – grawity Jul 27 '11 at 11:57

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.