As the title says, I'm attempting to make it so my primary account on my ubuntu machine has rwx privileges over the home directory of another account. I made a group for both accounts to share and moved the home directory's group to that one sudo chgrp -R sharedgroup /home/targetacct/, then sudo chmod 776 -R /home/targetacct.

Now I can see the /home/targetacct/ folder, and some misc. files inside, but I can't see any of the other folders inside, unless I use sudo ls -l /home/targetacct/. That shows that the permissions are set as I wanted them to be, and the filegroups have all been changed, but attempting just ls -l /home/targetacct/ gets me ls: cannot access '/home/targetacct/test': Permission denied and a list of the folders. Opening the home folder in the file viewer similarly gives me a list of the folders, but tells me I lack the permissions to view their contents.

Am I missing something? From what I read, I would expect this if I lacked execute permissions, but sudo ls -l tells me my group has permissions over all the files in the directory.

  • Have you logged out and back in (or at least started a new login shell, e.g. su - $USER) so that any new group membership(s) take effect? – steeldriver Feb 17 '17 at 1:17
  • This method of achieving your goal is destined to fail, since all new files and folders created by the user will be created with that user's username and group and standard permissions. Also, using chmod -R is very dangerous because the permissions are set the way they are for a reason. You should only use it when you know what you're doing, which isn't the case here. – Chai T. Rex Feb 17 '17 at 1:37
  • @steeldriver yeah, that was it, thanks @ ChaiT.Rex hadn't considered that, thanks (though if you have time, could you elaborate on specific dangers of using chmod -R to change permissions for home directory? is that liable to mess up the way some programs work?) – phaedrus_schmaedrus Feb 17 '17 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.