I thought that the purpose of the Public folder was to share with other users on the computer. Anything added there would be made available instantly to the other users on the computer. However, that does not appear to be the case. Is there a way to make this happen?
A simple (but not secure) solution:
Each user must change the access rights to their personal Public folder (~/Public) to 777. In Files open the Properties dialog and choose the permissions tab. Click on the "Write" buttons for "group" and "everyone".
Once this is done you can create a link to another user's Public folder in your own home directory (or anywhere you can write to) by either
- dragging and dropping that folder with the secondary (right) button or
- using "Copy as Link" and "Paste" context menu options.
Another solution is to open a Files window as Administrator (right-click on dock icon) then create a global Public folder in e.g. /opt. Change the permissions to 777 as before. Then each user can create their own link to that folder in their home directory.
If you want one folder for all users, yes it is possible.
Before you start, please empty both the Public folders in order to prevent data loss. I will use into the command lines below user1 and user2 but you have to replace these strings with the actual usernames you want to manipulate. The Public folder's icon of the Public folder of user2 will be changed, with an arrow sign informing that this is actually a simlink. All the commands have to be typed (or copy-paste and edit the user1 and user2) into Terminal application line by line and pressing Enter. You have to do this logged in into user1 account. You will use the sudo command, which gives you administrative rights and that's why you will be asked for a password, probably only the first time you are using it.
1. create a custom group for both of the users
sudo addgroup sharedfolder
type your password and hit enter
2. add both users into the group
sudo adduser user1 sharedfolder sudo adduser user2 sharedfolder
3. Change ownership of the Public folder to the new group
sudo chown user1:sharedfolder /home/user1/Public
4. Change folder permissions in order to achieve the effect:
sudo chmod 2775 /home/user1/Public
Explaining the permissions 2775 in the chmod command above:
- 2 – turns on the setGID bit, implying–newly created subfiles inherit the same group as the directory, and newly created subdirectories inherit the set GID bit of the parent directory.
- 7 – gives rwx permissions for owner.
- 7 – gives rwx permissions for group.
- 5 – gives rx permissions for others.
(r=read, w=write, x = execute)
5. Rremove the Public folder of user2:
sudo rm -rf /home/user2/Public
this will delete the folder with all contents and there is no easy way to return them back so you better not having there anything.
6. Navigate to user2 home folder:
7. Create a symlink into the user2 home folder to the Public folder of user1:
sudo ln -s /home/user1/Public
Now any file you copy and paste or create into the Public folder will be with 2775 permissions and a sharedfolder group.
If you cut some file from somewere and paste it there, the permissions will not be changed and probably will be locked for the other user unless you change group (sharedfolder) and permissions (775) before you log in into the other account.
You can do this using your file manager, right click over the file or folder > Porperties > Permissions tab. See the folowing images for info, but much more easier is to copy/paste and delete source.