Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This question already has an answer here:

I have a directory, under /srv:

drwxrwxr-x 3 minecraft minecraft 4096 Dec 30 06:23 minecraft

Owned by user minecraft, group minecraft. Group has read/write/search permissions. I have a user, shelvacu, that is part of the minecraft group:

$ groups shelvacu
shelvacu : shelvacu sudo minecraft

And, as shelvacu, I run mkdir /srv/minecraft/testdir:

$ mkdir /srv/minecraft/testdir
mkdir: cannot create directory ‘/srv/minecraft/testdir’: Permission denied

Why? The minecraft group has write permission on the directory, and shelvacu is part of the minecraft group. What am I missing?

share|improve this question

marked as duplicate by Gilles, slm, Anthon, Karlson, jasonwryan Dec 31 '13 at 19:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@janos No, in fact that was what I first tried. I can cd just fine, but mkdir gives the same. I just did it slightly differently for clarity, assuming they were the same. –  shelvacu Dec 30 '13 at 7:17
    
@janos also, /srv not /src, but thats hardly a problem. –  shelvacu Dec 30 '13 at 7:18
    
Yeah I mistyped it. I asked to confirm you have the right permissions up until /srv/minecraft itself, I was most interested in knowing if you can cd there –  janos Dec 30 '13 at 7:22
    
Is /srv on a dedicated partition, or the same as /? What's the output of mount | grep /srv? –  janos Dec 30 '13 at 7:24
    
Did you by any chance just add yourself to the group? This only takes effect when you log in. Use id to see your current group memberships. See I added a user to a group, but group permissions on files still have no effect –  Gilles Dec 30 '13 at 22:49

1 Answer 1

up vote 1 down vote accepted

First log in as the user shelvacu.

Then check your groups with id, so you don't add shelvacu to a group in one shell but try things inanother, not knowing about the change (as might happen with groups).

Change to /srv/minecraft, if that doesn't work, then you have not permissions on /srv (did make the /srv/minecraft as root for instance).

Now create directory with mkdir testdir. If that doesn't work, check the write permissions on current mount: mount | grep -F /srv (if that doesn't give results /srv is on /)

share|improve this answer
    
It seems I had not known I needed to re-login! Thank you for your help. –  shelvacu Dec 31 '13 at 7:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.