On 27/09/12 09:52, mc wrote:
> I need to let "other people" access a single file in read-only mode.
> I need to set the permission of a directories branch in order to avoid
> the listing of the contens of any directory.
Something to consider is to have a "shares" directory,
specifically for this purpose [so it can be protected as much
or as little as you like] containing hard links to any files
you want to make available: "ln my/project/file $HOME/shares".
Then you just tell people to look in your "shares" directory.
Pro: There is no need to allow any access at all to the project
area, and indeed the project can be moved or rearranged without
having to tell anyone. There is no clue in the linkage as to
where the [rest of] the project is.
Con: Hard links have to be on the same filesystem. Some editing
and back-up tools and similar are quite cavalier about whether
edits are applied to the original file or to a copy [which means
that the linkage is lost and you have to re-instate it]. If
you have several or many "single files", then you have to be
careful about name collisions.
Symbolic links ["ln -s ..."] could be used instead, with somewhat
different pros and cons.
--
Andy Walker,
Nottingham.