7
1
As per the title, I have to create a file, for example:
/home/john/file.ini
I created a user and a group, myuser
and mygroup
, and set them to be the owner and group of this file.ini
:
chown myuser:mygroup file.ini
I have another user named mymain
. This user must be able to read this file. How can I change the permissions to allow this?
Important: I want to allow only the "mymain" user to read this file, NOT all other users.
So myuser (the owner of the file) and mymain should have access.
3Put both users in the same group (and there should be no other user in this group). Assign the the file to the group. Done. – Felix – 2011-04-26T09:02:58.890