summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 6175b92c..43e43a6b 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -401,7 +401,7 @@ class chmod(Command):
 
 		try:
 			mode = int(mode, 8)
-			if mode < 0 or mode > 511:
+			if mode < 0 or mode > 0o777:
 				raise ValueError
 		except ValueError:
 			self.fm.notify("Need an octal number between 0 and 777!", bad=True)