Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two users on my Ubuntu machine. I want to share some media files between these users, so I created a directory in /home/ called 'media'. I made the group 'media' and I added my user 'rks171' to the group 'media'. So:

sudo groupadd media
sudo mkdir -p /home/media
sudo chown -R root.media /home/media 
sudo chmod g+s /home/media

As was described in this post.

Then, I added my user to the group:

sudo usermod -a -G media rks171

Then I also added write permission to this folder for my group:

sudo chmod -R g+w media

So now, doing 'ls -lh' gives:

drwxrwsr-x  2 root   media  4.0K Oct  6 09:46 media

I tried to copy pictures to this new directory from my user directory:

mv /home/rks171/Pictures/* /home/media/

And I get 'permission denied'. I can't understand what's wrong.

If I simply type, 'id', it doesn't show that my user, rks171, is part of the 'media' group. But if I type, 'id rks171', then it does show that my user, rks171, is part of the 'media' group. Anybody have any ideas why I can't get an files into this common folder?

share|improve this question
1  
Did you log in after adding yourself to the group? Or are you using your old session from before the changes? –  Hennes Oct 6 '12 at 14:59
    
That was the problem. I'll update it with the answer. Thanks a lot Hennes. –  rks171 Oct 6 '12 at 15:07

1 Answer 1

As Hennes pointed out in the comment section, I needed to restart my session by logging out and back in before the settings would take effect. Everything works fine now.

share|improve this answer
    
No jokes please, post them in chat, you will get stars :P –  HackToHell Oct 6 '12 at 15:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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