I have a problem understanding some aspects of file permissions. The situation is this:
I created a directory as /to using sudo and then changed it's permissions to drwxrwsr-x. I also changed the group for the directory to "xxx" which exists on my system. I am a member in good standing of group "xxx". My understanding is that I should be able to create files and directories in /to since I am a member of group "xxx".
However when I run the following command I get permission denied when trying to create each file and directory in /to.
cp -r from/* /to
What am I not understanding about this situation? I can obviously fix this particular instance with sudo or by changing the owner, but I want to understand the principles.
Command output
jgossage@Hector:~$ cp -r Downloads/* /Downloads
cp: cannot create directory /Downloads/Eclipse': Permission denied
cp: cannot create regular file /Downloads/google-chrome-stable_current_amd64.deb':
Permission denied
cp: cannot create directory /Downloads/Kindle': Permission denied
cp: cannot create directory /Downloads/WindowsDlls': Permission denied
#Target directory information
jgossage@Hector:~$ ls -al /Downloads
total 8
drwxrwsr-x 2 root admins 4096 Feb 13 07:16 .
drwxr-xr-x 28 root root 4096 Feb 14 08:23 ..
jgossage@Hector:~$
/
directory? – Tom Brossman Feb 14 '13 at 20:43