'Determine the setting to use for Secure NAS options.
Value of each NAS Security option is checked and updated. If the
option is currently \'auto\', then it is set to either true or false
based upon if this is a new Cinder installation. The RemoteFS variable
\'_execute_as_root\' will be updated for this driver.
:param is_new_cinder_install: bool indication of new Cinder install'

def set_nas_security_options(self, is_new_cinder_install):

    doc_html = 'http://docs.openstack.org/admin-guide/blockstorage_nfs_backend.html'
    self._ensure_shares_mounted()
    if (not self._mounted_shares):
        raise exception.NfsNoSharesMounted()
    nfs_mount = self._get_mount_point_for_share(self._mounted_shares[0])
    self.configuration.nas_secure_file_permissions = self._determine_nas_security_option_setting(self.configuration.nas_secure_file_permissions, nfs_mount, is_new_cinder_install)
    LOG.debug('NAS    variable    secure_file_permissions    setting    is:    %s', self.configuration.nas_secure_file_permissions)
    if (self.configuration.nas_secure_file_permissions == 'false'):
        LOG.warning('The    NAS    file    permissions    mode    will    be    666    (allowing    other/world    read    &    write    access).    This    is    considered    an    insecure    NAS    environment.    Please    see    %s    for    information    on    a    secure    NFS    configuration.', doc_html)
    self.configuration.nas_secure_file_operations = self._determine_nas_security_option_setting(self.configuration.nas_secure_file_operations, nfs_mount, is_new_cinder_install)
    if (self.configuration.nas_secure_file_operations == 'true'):
        self._execute_as_root = False
    LOG.debug('NAS    secure    file    operations    setting    is:    %s', self.configuration.nas_secure_file_operations)
    if (self.configuration.nas_secure_file_operations == 'false'):
        LOG.warning('The    NAS    file    operations    will    be    run    as    root:    allowing    root    level    access    at    the    storage    backend.    This    is    considered    an    insecure    NAS    environment.    Please    see    %s    for    information    on    a    secure    NAS    configuration.', doc_html)
