Linux groups - doing something wrong here.

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Spyder
Sith Marauder
Posts: 4465
Joined: 2002-09-03 03:23am
Location: Wellington, New Zealand
Contact:

Linux groups - doing something wrong here.

Post 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.
:D
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post 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?

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
Spyder
Sith Marauder
Posts: 4465
Joined: 2002-09-03 03:23am
Location: Wellington, New Zealand
Contact:

Post 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.
:D
User avatar
Spyder
Sith Marauder
Posts: 4465
Joined: 2002-09-03 03:23am
Location: Wellington, New Zealand
Contact:

Post by Spyder »

Oooh, fixed it.

Can I only have a max of two groups per user?
edit: nevermind, figured that out too...
:D
User avatar
Xisiqomelir
Jedi Council Member
Posts: 1757
Joined: 2003-01-16 09:27am
Location: Valuetown
Contact:

Post 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.
User avatar
EnsGabe
Youngling
Posts: 54
Joined: 2006-07-10 09:49pm

Post 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.
The Monarch: "Anyone wanna explain to me why my coccoon is charred?"
24: "Because you told us to blow it up"
The Monarch: "And why it is sideways?"
21: "We were following orders! You can't yell at us for following orders."
24: "Or kill us for following orders."
User avatar
Spyder
Sith Marauder
Posts: 4465
Joined: 2002-09-03 03:23am
Location: Wellington, New Zealand
Contact:

Post by Spyder »

Pretty much, I also needed to log in under recovery mode and put myself back in the admin group.
:D
Post Reply