def clean_path_execbit(path):
 current = path
 while True:
  try:
   mode = os.stat(current).st_mode
   if ((mode & stat.S_IXOTH) == 0):
    raise forms.ValidationError((_("The path '%s' requires execute permission bit") % (current,)))
  except OSError:
   break
  current = os.path.realpath(os.path.join(current, os.path.pardir))
  if (current == '/'):
   break

def clean_path_execbit ( path ) : current = path while True : try : mode = os . stat ( current ) . st_mode if ( ( mode & stat . S_IXOTH ) == 0 ) : raise forms . ValidationError ( ( _ ( "The path '%s' requires execute permission bit" ) % ( current , ) ) ) except OSError : break current = os . path . realpath ( os . path . join ( current , os . path . pardir ) ) if ( current == '/' ) : break
make sure the hierarchy has the bit s_ixoth set .