def test_public_from_share_error(self):
        """Users cant make public files shared."""
        share_dao = SharedDirectory(self.rw_share, by_user=self.sharer)
        sgw = ReadWriteVolumeGateway(self.user, share=share_dao)
        a_file = sgw.make_file(sgw.get_root().id, 'hi')
        self.assertRaises(errors.NoPermission,
                          sgw.change_public_access, a_file.id, True)