My home directory's permissions allow only myself access to it. Is it possible to put a file inside my home directory with.. say.. full permissions, and create a symlink to it so other users can access that file alone inside my home folder? System is Ubuntu Karmic.
It's possible, but not with symbolic links. It's called Hard links. Usage:
A reference to the file "the-file" will be created in
Hard links points to the same inode (file, directory, ...). Symbolic links have their own inode, and will not work in chroots for example. Since hard links links to a inode instead of a path, it can only be used on the same filesystem.
Another way would be bind mounts. This will require root permissions for running the
An easier way is to make a dir in your home directory, set it to whatever permission for the users you want to read to do so, then set your home dir to 701 permission.
With directories the read permission is needed to list the contents, execute to enter (as in to traverse, as done in the /path/to/dir part of the ls), and write to create files (when together with execute).
ls /home/[user] -- permission denied ls /home/[user]/[shared dir] -- allowed
Anyone know of a down side to this? Please comment.