Artificial intelligent assistant

Why this error: "cannot create directory `foo': Permission denied" I get this error when I try creating a directory: [rex <03:57 PM> /var/tmp/pb82]$ mkdir foo mkdir: cannot create directory `foo': Permission denied But doesn't the following output indicate that I should be able to create directories there since I am a member of the www-data group to which that directory belongs? [rex <03:57 PM> /var/tmp/pb82]$ ls -l .. total 8 drwxrwxr-x 5 root www-data 4096 Aug 7 15:32 jinfo drwxrwxr-x 3 root www-data 4096 Aug 7 20:43 pb82 [rex <03:58 PM> /var/tmp/pb82]$ whoami rex [rex <03:58 PM> /var/tmp/pb82]$ groups rex users www-data Edit: in response to @UlrichDangel: [rex <04:08 PM> /var/tmp/pb82/jinfo]$ id uid=1008(rex) gid=100(users) groups=100(users)

You probably added yourself to the `www-data` group and didn't relogin afterwards. To change your group membership you can use


sg www-data


to get a new shell with the appropriate permissions.

groups will return the data from the database and not your effective permissions - from man groups:

> Print group memberships for each USERNAME or, if no USERNAME is specified, for the current process (which may differ if the groups database has changed).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 128c4765e05cb52b66cd8d7abdd70996