2

I have root access in my Linux environment. I have a directory 'officestaff'; this directory permissions were changed to 775 and the modification date changed. How can I know the previous permissions of that directory before modification?

I have tried history but it does not show any chmod on the directory.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
gs rao
  • 43

1 Answers1

2

Past permissions of files are not recorded by default. Unless you had taken steps to set up some form of logging before the change happened (a variant of Is it possible to find out what program or script created a given file?), this information is not available. And even then logging would only tell you what changed, not what was there before.

Even if you did find the command that changed the permissions in some history, that wouldn't tell you what the previous permissions were.

Unless you had set up a way to track permission history, the only place where the historical information is available is your backups.