diff --git a/salt/states/file.py b/salt/states/file.py
index <HASH>..<HASH> 100644
--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -362,14 +362,14 @@ def _check_perms(name, ret, user, group, mode):
     perms = {}
     perms['luser'] = __salt__['file.get_user'](name)
     perms['lgroup'] = __salt__['file.get_group'](name)
-    perms['lmode'] = __salt__['file.get_mode'](name)
+    perms['lmode'] = __salt__['file.get_mode'](name).lstrip('0')
 
     # Mode changes if needed
     if mode:
         if mode != perms['lmode']:
             if not __opts__['test']:
                 __salt__['file.set_mode'](name, mode)
-            if mode != __salt__['file.get_mode'](name):
+            if mode != __salt__['file.get_mode'](name).lstrip('0'):
                 ret['result'] = False
                 ret['comment'] += 'Failed to change mode to {0} '.format(mode)
             else:
Fix issue where modes like <I> would always fail

The file state was checking for <I> to equal 7, this obviously failed,
so the same logic used to generate the integer if used to compare the
integer now