0

I use getfacl -RP ../www > permission_backup to store the permission and Beyond Compare to compare two permission_backup,if permission has any change,I will run setfacl --restore.

I found a problem,I run getfacl -RP ../www > permission_backup to the same folder twice,items in permission_backup may have different order,then Beyond Compare will tell me there's big different.

For example: One permission_backup is as below:

# file: ../www/info/2013-09-05/16.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

# file: ../www/info/2013-09-05/1.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

# file: ../www/info/2013-09-05/23.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

Another one is:

# file: ../www/info/2013-09-05/23.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

# file: ../www/info/2013-09-05/16.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

# file: ../www/info/2013-09-05/1.html
# owner: apache
# group: apache
user::rw-
group::r--
other::r--

How to make getfacl run with certain order?

kittygirl
  • 2,255
  • 5
  • 24
  • 52

1 Answers1

0

Iterate through the directory manually, using a loop or find call and then call getfacl on each file.

arrowd
  • 33,231
  • 8
  • 79
  • 110