Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have these permissions on a file:

-rw-r----- 1 root www-data 540 Mar 18 21:12 /etc/phpmyadmin/config-db.php

User vagrant is a member of group www-data:

vagrant@precise64:~$ cat /etc/group | grep www-data

Why can't I read the file as vagrant?

vagrant@precise64:~$ cat /etc/phpmyadmin/config-db.php
cat: /etc/phpmyadmin/config-db.php: Permission denied
share|improve this question
Just to be sure, can you check if your membership to the group is enabled via the groups command? – Ketan Mar 19 '14 at 2:35
What are the permissions for /etc/phpmyadmin? Is some LSM (AppArmor, SELinux) active? Have you just (i.e. after the last login) added the user to the group? – Hauke Laging Mar 19 '14 at 2:36
@Ketan That is probably not going to help as it seems that group just accesses /etc/group. But the relevant question is: Is the group in the group list of the running process... – Hauke Laging Mar 19 '14 at 2:39
That would be id. vagrant needs "x" (yes, execute) permission on etc and phpmyadmin directories to get to the file. – Ricky Beam Mar 19 '14 at 2:47
What is the output of command ps -p 3070 -o pid,fgroup,supgrp,args? (command is used to avoid aliasing in bash) – Hauke Laging Mar 19 '14 at 2:48

1 Answer 1

up vote 2 down vote accepted

Log in again to make the current group membership configuration active. After a process has been created its group membership does not change (at least not by making changes in the account management).

share|improve this answer

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.