-1

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?

Zanna
  • 70,465

2 Answers2

2

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/
Zanna
  • 70,465
nux
  • 38,017
  • 35
  • 118
  • 131
  • 1
    It is simple, but by default you will need 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
0

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.

ChrisR.
  • 527
  • 4
  • 7
  • a 6 or 4 permission on a directory is useless - may as well be 0, because directories need execute permission to be accessed. Files don't get execute permission just because their parent directories have it (and no umask setting will allow creation of executable files) - x bits always have to be added. Also, pictures and videos don't need execute permission. So, the information you've given about permissions in this answer is misleading – Zanna Aug 13 '18 at 10:01