User Accounts Can View Each Other's Home Directory

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
stoneheart

User Accounts Can View Each Other's Home Directory

Post by stoneheart »

Newbie here. I want to create a guest account on my system. I tried using the gui application, but when I opened it, it did not give me the option to create a new account, likely because I am not root. (I was not prompted for the sudo password like I thought I would be.) I then tried it using the sudo adduser command and was successful. However, when I login as the new account there seems to be no permissions enforcement as I can view my master account's directories and files.

Any ideas on how to fix this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: User Accounts Can View Each Other's Home Directory

Post by Fred »

stoneheart,

Log in as username1 and open a terminal and type one line at a time and press enter: (Substitute your username for username1 and the second username for username2.)

sudo chown -R username1:username1 /home/username1

sudo chown -R username2:username2 /home/username2

sudo chmod -R 600 /home/username1

sudo chmod -R 600 /home/username2

Close terminal. Now neither user will be able to access the others /home folder.

Fred
stoneheart

Re: User Accounts Can View Each Other's Home Directory

Post by stoneheart »

Thanks, Fred. These commands must change the permissions on the directories...Please indulge my curiosity, though... Is this the correct default behavior on setup of new accounts or is this a 'bug' in Mint/Ubuntu? If this is the correct behavior, it makes me wonder what the purpose of having separate accounts are.

Thanks again!
Fred

Re: User Accounts Can View Each Other's Home Directory

Post by Fred »

stoneheart,

I can't give you a good answer. The default permissions are set by the developers of the individual distros. In practice you will see various permission sets from one distro to another, and even between versions. I guess it depends on how the developers see the distro being used. As you can see file/folder ownership and permissions are easily set so it doesn't seem to be a big issue.

Fred
Locked

Return to “Beginner Questions”