Protecting access and sharing a file