Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

-edit- i figured it out. I needed to use adduser username group instead.

I added a user with the command

useradd -G myapp_user newusername

then i changed the group on the public folder that i want the user to access. Here is the line using ls -l I see the group has been set.

drwxrwxr-x 3 root myapp_user 4096 Jul  9 19:13 public

I cd into it and do it again to and i see files like the below with the group. I also see rwx on both the public folder and on the content inside the directory.

-rwxrwxr-x 1 root myapp_user   4403 Oct 10  2007 info.png

Then i login as the user and CD into the folder i wrote touch a and i got a permission error. I cant add, delete or do anything even though i see 775 is the permission. I also tried useradd -G myapp_user newusername to find the user is already part of the group

what am i missing? am i suppose to flush something before it takes effect? restart something? why cant the user modify anything in the public folder?

using putty and winscp. But right now just putty.

-edit- i wrote id newusername and got the below. Why isnt the groupname included?!

uid=1000(newusername) gid=1000(newusername) groups=1000(newusername)
share|improve this question
Go ahead and put your edit in as an answer, then you can accept that. Makes things a bit easier to follow when someone views the question. – squillman Jul 10 '10 at 5:47
Please do id -a newername so that all groups are visible. From the basic output provided, it would appear that newusername does not have myapp_user as a group. Between the group changes, I hope that you logged out and then logged in as the group membership is populated only at login. – mdpc Jul 10 '10 at 6:26
up vote 1 down vote accepted

use adduser username group instead

share|improve this answer

You setup the groups correctly, but the user's list of groups is set when they first login, and won't normally ever be re-evaluated. If you make a change to a user's list of groups, you either need to log out and log back in, or you need to run the newgrp command.

share|improve this answer

Put the newusername into the myapp_user group with gpasswd -a newusername myapp_user. You should close any open session for newusername and perform a new login for the new group to be effective.

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.