Page 1 of 1

Linux groups - doing something wrong here.

Posted: 2006-11-25 04:42pm
by Spyder
Ok, I'm trying to give myself write access to /var/www by using a group. If possible I'd like to avoid having to have it be my primary group as I'd like to be able to give other users access to it in future.

Anyway,
ls -l within /var gives me

drwxrwxr-x 3 root www 4096 2006-11-26 10:15 www

The last few lines of /etc/group

mark:x:1000: (group identical to my userID, created when userID was.)
admin:x:112:
files:x:1001:
mysql:x:113:
ssl-cert:x:114:
www:x:1002:mark (group I created, then added myself to with "usermod -G www mark")

Still no write access.

I get the impression I'm either doing something wrong or impossible. Can anyone give me some pointers here?

Edit: I think I may have just fucked my sudo access.
Edit2: Yes I did...and there's no password set on root....great.

Posted: 2006-11-25 05:57pm
by Pu-239
Well, to fix password boot using installer CD and use rescue mode to open a console, then do passwd root, set the root password and set sudoers appropriately.


You usually have to logout/login before new group settings take effect (or su to yourself).

What distribution are you using? Ubuntu? Isn't the default www group www-data?

Posted: 2006-11-25 06:06pm
by Spyder
Pu-239 wrote:Well, to fix password boot using installer CD and use rescue mode to open a console, then do passwd root, set the root password and set sudoers appropriately.


You usually have to logout/login before new group settings take effect (or su to yourself).

What distribution are you using? Ubuntu? Isn't the default www group www-data?
Yes it is, realised that after the fact. Hasn't been my morning.
Oh well, screwing this up several times in a variety of different ways is one way to become an expert I suppose.

Posted: 2006-11-25 07:53pm
by Spyder
Oooh, fixed it.

Can I only have a max of two groups per user?
edit: nevermind, figured that out too...

Posted: 2006-11-25 11:41pm
by Xisiqomelir
Spyder wrote:edit: nevermind, figured that out too...
Isn't learning about your system and how it actually works and what's actually going on awesome? I agree.

Posted: 2006-11-26 12:25am
by EnsGabe
For posterity, can you describe the resolution to the issues?

My gut says you logged out and then logged back in- permissions are from /etc/groups at login. The changed permissions weren't reflected until you logged in again.

Posted: 2006-11-26 12:52am
by Spyder
Pretty much, I also needed to log in under recovery mode and put myself back in the admin group.