I have just opened an account on the system settings on my PC for family members. I want to put some pictures and videos from my account on to theirs.
How can I do that?
I have just opened an account on the system settings on my PC for family members. I want to put some pictures and videos from my account on to theirs.
How can I do that?
It's very simple. Here it's not really sharing; because users are on the same PC, you are just copying or moving files between directories.
You can navigate to user account cd /home/user/
, then you can move your files into their Documents folder for example:
cp /home/your-user/testfile /home/their-user/Documents/
sudo
for this as your-user
, though not as their-user
, because your user won't have write permission in their home directory
– Zanna
Aug 13 '18 at 10:05
There are several ways to do this. The easiest way would be to make a folder in /home
, let's call it share
and give it permissions for all users to read and write to the folder with chmod 776
. This isn't the most secure way to go about doing it, as it allows anyone with access to the system to put files into the folder. The folder permissions would look like this (if you used ls -l
):
drwxrwxrw- user user 4096 share
a more secure way to allow sharing between accounts would be through the use of groups and folder permissions. Here are the steps:
1) Add a group called familyshare
:
sudo groupadd family share
2) Add the user you created for your family (let's call it family
, but it can be whatever you want) to the group:
sudo useradd -G familyshare family
3) Create the directory that you want to share with your family in /home
(let's call this directory share
)
cd /home
sudo mkdir share
chown :familyshare share
chmod 774 share
4) Check the permissions on the directory and test it with the family
user:
ls -l /home
#you should see something that looks like this
drwxrwxr-- user familyshare 4096 share
su family
cd /home/share
mkdir test
If everything went according to plan, there should be a folder called test
inside the share
directory. Anyone who is a member of the group familyshare
should be able to read, write, and execute files in the share
directory. If you do not want them to be able to execute files, but still read and write, you can change the permissions to using chmod 764
on the share
directory.
sudo mkdir /media/pictures ; sudo chown your_user:users /media/pictures; chmod 775 /media/pictures
– Panther May 27 '14 at 22:43