0

Each time you create a file or upload it via FTP, considering your user is "myuser", it's chwon would be "myuser" for user and "myuser" for group. So you have to manually execute chown command to change the group ownership to lets say apache.

I'm constantly uploading project files to my development server, and I have to manually chown those files to the a group that apache and myuser belongs to, so that they can be executed.

Is there a way to make this files I upload or create automatically belong to an specific group (lets say "www-data"), so that I dont have to chown em manually? If so, guide me please as I am no expert in linux, I'm like intermediate.

PS: Using CentOS 6.5

3

1 Answer 1

0

There are two versions of the usermod command that apply. With and without -a which means add or append. Without -a the users other groups will be removed, with -a the new group is added to existing groups.

I actually read "How do I change a user's primary group?" right before I do it, because it's not a function you deal with everyday.

1
  • Don't worry, that's why the web site is collaborative. Some info is better than no info in my opinion. Jul 22, 2014 at 17:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .