1

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
www-data:x:33:vagrant

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
  • Just to be sure, can you check if your membership to the group is enabled via the groups command? – mkc Mar 19 '14 at 2:35
  • 2
    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
2

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.