所以标准文件权限写在0到7:
7 = 4+2+1 (read/write/execute)
6 = 4+2 (read/write)
5 = 4+1 (read/execute)
4 = 4 (read)
3 = 2+1 (write/execute)
2 = 2 (write)
1 = 1 (execute)
所以我想说我想以同样的方式保存记录的权限。如何在允许“读取”权限的记录上放置查询/范围。
例如4 == :record_permission % (4+1)
应返回权限记录可读的所有内容。