Wednesday, September 3, 2014

linux - Added a new user to group www-data and to sudoers, still not sure why user creates new directories as root

I'm new to Linux systems administration (dealing with users and groups) but I do have a lot of command line experience as a developer. Right now, i'm trying to make sure that three users I've added to my Debian server under the group www-data have the appropriate and expected permissions. The goal is to have all the directories in /var/www/html/ as www-data:www-data (I think that's what I want at least...I'm doing this so i don't have mixed permissions between things created under root and www-data).



I added my three new users to the sudoers file with the ALL option (the same as root).



I don't know how to think of the users now though and I need some guidance in this.



For instance, when I login as developer1 and issue the command mkdir it tells me I don't have the appropriate permission to do this. So I sudo and type in the password for my user and then mkdir test...and it shows as a dir with root as the owner and root as the group.




How can I make developer1 a user that can create directories with www-data as owner and group? Is this the right way to approach this?



thanks.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...