~/Private/ 700
~/Private/Group 770
~/Private/Group/Public 777
A user who isn't the owner of ~/Private/
, and ~/Private/Group
will not be able to get into the Public folder with these permissions.
On Unix/Linux you must add the execute bit for a user to be able to traverse (change into or through) a directory. But you don't need to grant read access. So try this instead. But keep in mind, that the user must know that the Group and Public directories exist, there will be no way for them to use ls
to see if they exist unless they are also granted read access.
~/Private/ 711
~/Private/Group 771
~/Private/Group/Public 777
does it matter whether I use -R when doing 'chmod 700'
If you run that command you are going to change the permissions of every file an directory below the directory you target, if you have anything with different permissions, then they will get lost. I suspect you would also be adding the execute bit to a lot of regular files, which is generally undesirable.
You might want to use a command like this instead. This will only change the permissions on the directory, and subdirectories, without changing permissions on the files.
find {directory_path} -type d -print0 | xargs --null -n 1 chmod 0700
A similar command to change only the files would look like this.
find {directory_path} -type f -print0 | xargs --null -n 1 chmod 0600