File permission issues after setting up an amazon ec2 instance

Posted by Pardoner on Ask Ubuntu See other posts from Ask Ubuntu or by Pardoner
Published on 2012-10-24T16:41:08Z Indexed on 2012/10/24 17:14 UTC
Read the original article Hit count: 301

Filed under:
|

I've set up an amazon ec2 instance and I'm have some file permission issues. I've created myself a new user and added myself to the following groups:

adm:x:4:me,ubuntu
www-data:x:33:me,www-data
ssh:x:108:me
admin:x:111:me
ubuntu:x:1000:www-data,me
me:x:1001:me

but when I cd /var/www I can't do simple commands without doing sudo first. So I chmod -R www-data:www-data /var/www to ensure that I'm in the owning group but I still have to type sudo for everything. If I sudo su www-data it works fine. Since I'm in the www-data group shouldn't I have the same privilages as www-data?

One strange thing I'm noticing is that when I ls -l it list the owner but not the group names. Could this possibly be part of the issue? Is is posible for a directory to not be part of a group?

drwxr-xr-x  4 www-data 4.0K Oct 24 16:39 .
drwxr-xr-x 14 root     4.0K Oct 10 16:58 ..
drwxrwxr-x  9 www-data 4.0K Oct 23 04:03 admin.mywebsite.com
drwxrwxr-x  2 www-data 4.0K Oct  4 00:29 mywebsite.com
drwxrwxr-x  9 www-data 4.0K Oct 23 04:03 staging.mywebsite.com

© Ask Ubuntu or respective owner

Related posts about permissions

Related posts about sudo