You are not logged in.

#1 2012-01-13 23:56:35

bjackman
Member
Registered: 2011-12-27
Posts: 32

[Solved] Problem with file permissions for a group

I'm working on a simple Apache HTTP server just to get a small education in proper unix work.
To save myself sudoing everything (and generally because it seems the proper way to use unix), I'm trying to give my user control over the /srv directory. So I ran:

- `sudo groupadd srvadmin` to create a group called srvadmin
- `sudo chown -R :srvadmin /srv` to change the group-owner of /srv to srvadmin (and all files inside it)
- `sudo chmod -vR g+w /srv` to give /srv and all its files group write permission
- `sudo gpasswd -a <me> srvadmin` to add my user to the srvadmin group

But I still can't create or edit files in /srv

"ls -l / | grep srv" gives:

drwxrwxr-x  4 root srvadmin  4096 Dec 19 17:44 srv

all the files and directories inside /srv also have group write permissions and are owned by user "root" and group "srvadmin"

"cat /etc/group | grep srv" gives:

srvadmin:x:1000:<me>

However, possibly herein lies a clue:
"id" gives:

uid=1000(<me>) gid=100(users) groups=100(users),7(lp),10(wheel),50(games),91(video),92(audio),93(optical),95(storage),96(scanner),98(power)

That is, "id" doesn't tell me I'm in the srvadmin group.

It seems like there's an important concept about groups and permissions that I'm not getting, but reading several man and wiki pages hasn't enlightened me. Could anyone suggest what I'm missing?
Thanks.

Last edited by bjackman (2012-01-15 20:43:09)

Offline

#2 2012-01-14 00:34:17

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [Solved] Problem with file permissions for a group

Log out and in again to activate the new group membership.

Offline

#3 2012-01-14 00:34:19

SS4
Member
From: !Rochford, Essex
Registered: 2010-12-05
Posts: 699

Re: [Solved] Problem with file permissions for a group

Have you logged out and then back in again as user? You have to re-log in for group changes to take effect


Rauchen verboten

Offline

#4 2012-01-14 17:51:03

bjackman
Member
Registered: 2011-12-27
Posts: 32

Re: [Solved] Problem with file permissions for a group

Wow. I expected I would be made to look slightly silly here but I hadn't counted on it being that simple.
I thought of rebooting but I was worried it wouldn't come back online - I'm doing it from university over ssh. Silly me.
Thanks!

Edit: I'm guessing only mods can put [Solved] tags in a title?

Last edited by bjackman (2012-01-14 17:54:50)

Offline

#5 2012-01-14 18:33:59

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [Solved] Problem with file permissions for a group

bjackman wrote:

Edit: I'm guessing only mods can put [Solved] tags in a title?

No, our job is to tell you to do it yourself: https://wiki.archlinux.org/index.php/Fo … ow_to_Post (second to last bullet) tongue


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#6 2012-01-15 20:45:31

bjackman
Member
Registered: 2011-12-27
Posts: 32

Re: [Solved] Problem with file permissions for a group

fsckd wrote:
bjackman wrote:

Edit: I'm guessing only mods can put [Solved] tags in a title?

No, our job is to tell you to do it yourself: https://wiki.archlinux.org/index.php/Fo … ow_to_Post (second to last bullet) tongue

Ok, this is pretty embarrassing given the parallels with the topic of this thread, but I coudn't edit the title (which is the reason for my earlier remark; I assumed I didn't have permission)!
The text box was un-editable (not "disabled", I just couldn't edit the text in it). I managed to change it in the end by deleting all the text and typing a new title. I think it may have been just because the title was at the exact character limit. roll

Offline

Board footer

Powered by FluxBB