How to Copy a folder across multiple user accounts on a Linux Ubuntu 20.0 Virtual Machine on azure.
The aim of this article is to show you how to Copy directories from the desktop environment to a root folder on your hard drive on a Linux Ubuntu 20.04 Virtual Machine on azure when these 2 locations have multiple users (phew, what a mouthful).
Problem :
I had an Ubuntu version 20.04 Virtual Machine on azure on which I installed a desktop environment using this tutorial.

The desktop environment was located in the home directory. However, I later realized I had created one user while I was provisioning the VM and created another user while I was setting up the desktop environment. This meant this new user (sophie/admin) only had access to the desktop environment directories while the second user(Azureuser/Super admin)had complete access across board, from the root to the desktop environment. edit: This is normal in every Linux system.
Hence, azureuser(Super Admin) had write, read and execution right access. This means this user could copy/move/create files, view files and could run files in the desktop environment. While the second user(sophie) could only view files(read access) on the super admin portion of the hard drive.So the first user could copy to Sophie but Sophie could not copy to azure user.
Solution:
The solution was to fix the permission issue.
What I did was simply to run this command while signed in as the super admin.

Other things I tried
- sudo -H
- nautilus admin://
- pkexec nautilius
All in an attempt to run as a super admin.
Hope this was helpful.
Also posted on my blog.
References
- https://www.pluralsight.com/blog/it-ops/linux-file-permissions
- https://askubuntu.com/questions/551047/copying-files-from-one-user-to-another-in-a-single-machine
- https://laracasts.com/discuss/channels/general-discussion/php-artisan-errorfailed-to-open-stream-no-such-file-or-directory
- https://stackallflow.com/ubuntu/how-to-configure-pkexec-in-ubuntu/
- https://help.ubuntu.com/community/RootSudo
- https://help.ubuntu.com/community/FilePermissions
- https://www.reddit.com/r/linuxquestions/comments/n90sry/error_spawning_command_line_dbuslaunch/
- https://askubuntu.com/questions/86849/how-to-unzip-a-zip-file-from-the-terminal
- https://askubuntu.com/questions/86849/how-to-unzip-a-zip-file-from-the-terminal
- https://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists
- https://www.how2shout.com/linux/open-ubuntu-file-manager-as-root-user/
- https://itsfoss.com/open-nautilus-as-administrator/
- https://askubuntu.com/questions/150028/you-are-not-the-owner-message-when-trying-to-access-folder
- https://www.reddit.com/r/linuxquestions/comments/n8r3a5/sudo_nautilus_not_working/gxk0uu8/
- https://www.reddit.com/r/linuxquestions/comments/n90sry/error_spawning_command_line_dbuslaunch/
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- https://docs.microsoft.com/en-us/azure/virtual-machines/linux/use-remote-desktop