Common folder in linux
- by rks171
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?