[Novices] permissions & sharing between users
Bruce Smith
bruce at armintl.com
Sun Dec 12 15:37:43 EST 2004
> I know this should be easy, but I just can't seem to work out
> permissions, or find the information I need on the web or in my books.
Directory permissions on Unix/Linux are NOT easy for a beginner (been
there), so don't feel bad! :-)
> Basically, I have a computer at the office with a set domain name and
> sftp enabled (but no web serving or anything). I'd like users I've set
> up to be able to log in and download / upload files from / to a "public"
> directory of some kind. First, how would I make a directory like that,
Make a directory somewhere, and give it 777 permissions.
> and where's the standard place to put it? /usr/share or something?
AFAIK, there is no standard place, so put it on a partition where you
have the disk space to spare.
> Second, suppose I wanted a subdirectory of my home directory to be
> shareable in this way. I tried 'chmod 1777' and the like but still
> other users can't see it, I guess because the parent directory is still 700?
Yes, it's because your home directory is not readable by other users.
You could let people read your home directory by giving it 755
permissions. They won't be able to write to your home, they can only
write to files and directories in your home where they have write
permission. And they won't be able to create or delete files/sub-dirs
in your home, no matter what permissions the files/sub-dirs have.
They will still be able to access files in your shared subdir if you
give it 777 permissions.
Or, if you don't want people to be able to list out the files and dirs
in your home directory, but still be able to access your shared dir,
give your home directory 711 permissions. Then they will only be able
to access files and directories that they know the exact name. (save as
above, but no listing of your home directory)
Confused yet? You should be! :-) Let me know if I can explain more.
- BS
More information about the Novices
mailing list