access one document from 3 different linux accounts

My 2 sisters and I have accounts on my computer.  If I go find a neat wallpaper from my account, how can I put it on their accounts?  Do I have to download it three times?  Can I use Ubuntu  One to share the file or is there some common area on my machine where all 3 accounts can access the file?
Who is Participating?
farzanjConnect With a Mentor Commented:
You need to create a common folder.

Say /share

mkdir -m 000 /share

Open in new window

Then you have to give all the three users access to this folder.  Currently, no one can access it.

setfacl -m u:user1:rwx /share
setfacl -m u:user2:rwx /share
setfacl -m u:user3:rwx /share

Open in new window

Giving access is giving access to the folders, not files.  Once users have access to a folder, they can even change their file permissions as per their needs.  Or, you can use the same technique of using ACLs to allow access to each file.  You can use -R option to recursively allow access to all the files currently present in the folder.

Second approach is to:
1. create a group,
2. add all three users to the group
3. create a folder with its entire path accessible for that group.
4. Make this folder owned by this group
5. Give permission, 770 to this group-- remember giving O (others) full permissions is a very bad idea.

Now it will be accessible by all three users.  This is a little complicated approach, the first one is simple to implement.
chmod o+r  document
will make document readable by anyone
dwcroninAuthor Commented:
farzanj: What is "ACL"?  My friend blew out his ACL in football practice.  That's probably not what you mean...
Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

dwcroninAuthor Commented:
farzanj: I thought that was "setfac1" but that's "setfacl".  My mistake: "Access Control List".
Yes, it is setfacl  --L not 1.

Yes, it is Access Control List.  There are many different types of ACLs.  Many applications have their own ones.  But this is ACLs of the filesystem.

You can check ACLs by issuing command

getfacl filename
dwcroninAuthor Commented:
farzanj and ozo:  if I remember right, "ls" gives 10 characters and then the name of the file/directory.
owner: read/write/execute
group: read/write/execute
other (aka everyone): read/write/execute
Logically, where should "share" be?  Is it in my home directory with file permissions set to "777" or is "share" above everyone's home directories?
Gerwin Jansen, EE MVETopic Advisor Commented:
>> Is it in my home directory with file permissions set to "777" or is "share" above everyone's home directories?

As suggested by farzanj already: it's better to have a separate folder for sharing files. /share will do fine. That way all users have personal directory (/home/userid) and a (combined) folder /share for sharing things ;)
dwcroninAuthor Commented:
That's the part I don't understand - is "/share" off of my home directory - /home/dwcronin/share, or is it clear at the top with /etc, /sbin, /home?
/share is out of any other directory

In Linux/Unix filesystem, the top of tree is /
It is under directory /

|                          |                          |                   |
home                  usr                      share           etc
dwcroninAuthor Commented:
Thank you.
You are welcome.
dwcroninAuthor Commented:
farzanj: my apologies - I got "~" and "/" confused.
No problem.

/ is just / literally and is not expanded into anything else.

~ is expanded into your $HOME.  Suppose, I am user farzanj with home directory /home/farzanj

Then if I say

echo ~

It will be evaluated to

If I am root with home account /root then
echo ~ will be expanded to

If you want to see the home account of userB then I can write
echo ~userB

Will evaluate to, may be,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.