0

Here is the case:

adduser pravdomil www-data
adduser tana www-data
touch                     /home/test.txt
chown pravdomil:pravdomil /home/test.txt
chmod 440                 /home/test.txt
reboot
runuser -l tana -c 'cat   /home/test.txt'

Produces cat: /home/test.txt: Permission denied on Ubuntu 16.04.1 LTS

The file is readable by group and if two users is in the same group (and one is the owner of file) both should have read access?

pravdomil
  • 103

1 Answers1

4

Well, user tana is not member of group pravdomil. With chown pravdomil:pravdomil you set user pravdomil and group pravdomil as owner of /home/test.txt.

Try with chown pravdomil:www-data /home/test.txt.

13dimitar
  • 935