0
  1. Ubuntu 20.4 installed with user Marco
  2. created other user Polo by going to |settings > Users > Add User|
  3. created "commonDir" folder in Marco's home directory. |right click > new folder|
  4. logged out from Marco. |click top right corner > power Off/Log Out > Log Out|
  5. logged into Polo
  6. navigated to Polo's home directory but "commonDir" folder was not visible.

What should I do in order to make it accessible by both the users.?

(Still working my way through linux commands. That's why I'm using UI to do all the things)

2
  • So you created CommonDir in Marco's $HOME, lets say /home/Marco, and created Polo's user (with his own $HOME != Marco's $HOME let's say /home/Polo). If so, why would you expect Commondir (/home/Marco/Commondir) to automagically appear when listing /home/Polo ?
    – MC68020
    Jun 20, 2022 at 17:44
  • I don't know how to set attributes for that folder so that it'll become visible to other user accounts. Maybe I'm doing it all wrong.
    – As13
    Jun 20, 2022 at 18:00

1 Answer 1

0

Should the commonDir folder be readable by both or writable by both?

If you want it to be readable by the other user: Try $ cd ../Marco/commonDir from Polo's home directory. With the GUI: Go to Files, and click Other Locations. Click on home, then Polo, then commonDir.

If you want commonDir to be writeable, try as Marco:

$ sudo groupadd commonDir
$ sudo chgrp commonDir ~marco/commonDir 
$ sudo usermod -a -G commonDir Polo 
$ sudo chmod 775 ~marco/commonDir 

Then as Polo:

$ newgrp commonDir
$ cd ~marco/commonDir
$ gnome-text-editor whatever_is_in_the_folder

Note: You have to do the above every time you want to write to things in the commonDir directory.

2
  • Maybe symlinking could make accesses easier.
    – MC68020
    Jun 20, 2022 at 18:05
  • Thanks a lot @lovecodeabc Very precise and least complex solution.
    – As13
    Jun 21, 2022 at 2:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .