While still allowing my account to access the root directory. I've tried adding myself to the root group with $ sudo adduser myaccount root
but when I do $ sudo chmod o-r /etc
followed by $ cd /etc
$ dir
it says permission denied.
Maybe I'm thinking about the wrong solution for my problem. I setup an ssh server with OpenSSH and want to give users the ability to navigate and edit files in a specific folder /home/myaccount/website/deveopment/
without giving them the ability to view or edit anything else.
To solve that problem, I'm attempting to disable 'other group' read permissions from every folder in root so that only root can access them. That's when I ran into the above problem. Even after adding myself to root, I still can't access directories with 'other group' read permissions disabled.
Best Answer
If all you want is for the users to be able to sftp files to/from a particular folder, why don't you set them up with an sftp chroot? This will make the folder you designate appear to be the root in their login.
See: http://www.debian-administration.org/articles/590 http://ubuntuforums.org/showthread.php?t=858475