Restrict acces to file field only to certain role I have a node-type called "download" that has a field "file" with unlimited entries. Those files are already stored inside a private path. Now I want to restrict access only to a certain role. I already tried field_permissions but when I enable View field_file, regardless of content author. and grant that permission only to authenticated users, I still can view/download that file as a guest. What am I doing wrong here?

Besides it would be nice to set permissions on a node base. Like "This Node is only Viewable by Role XYZ". 

Thanks for any hints!
like Colin McClure says, to control per node you can use with http://drupal.org/project/content_access .In the respective Access Control tab of each Content Type (when you edit a content type), you will find, in the bottom, the option to enable per content node access control settings.

About control per fields, seems that exist several modules to achive this:


http://drupal.org/project/field_permissions
http://drupal.org/project/cck_private_fields
http://drupal.org/project/privacy


and, from this resource you can find hooks to get permissions per field:

http://drupalcode.org/project/cck.git/blob/refs/heads/6.x-3.x:/modules/content_permissions/content_permissions.module

&lt;?php

/**
 *  Implementation of hook_perm().
 */
function content_permissions_perm() {
  $perms = array();
  foreach (content_fields() as $field) {
    $perms[] = 'edit '. $field['field_name'];
    $perms[] = 'view '. $field['field_name'];
  }
  return $perms;
}

/**
 * Implementation of hook_field_access().
 *
 * @see content_access().
 */
function content_permissions_field_access($op, $field, $account, $node = NULL) {
  switch ($op) {
    case 'view':
    case 'edit':
      return user_access($op .' '. $field['field_name'], $account);
  }
  return TRUE;
}