1

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?

screenshot

0

2 Answers 2

0

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

setfacl -m u:wwwrun:rw negin.txt
5
  • I'm so thankful to you,with this I have write and read access?
    – Nickool
    Jul 27, 2011 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. Jul 27, 2011 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, 2011 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, 2011 at 12:19
  • I tried it:D it works Nice and awesome:) I am so happy!
    – Nickool
    Jul 27, 2011 at 13:16
0

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

7
  • Thanks I tried it tells me this in shell:chown: invalid group: `:wwwrun'
    – Negin
    Jul 27, 2011 at 8:44
  • 1
    @Negin: because there is no such group?
    – phresnel
    Jul 27, 2011 at 8:47
  • then why I can set it by going to properties?
    – Negin
    Jul 27, 2011 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, 2011 at 9:00
  • 1
    @phresnel: chown accepts user, user:group, and :group. Jul 27, 2011 at 11:57

You must log in to answer this question.

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