0

I need to compress some files in a folder, but my system denies me access from doing so.

Since they are system files, how can I compress these files without changing the permissions?

I'm looking for some approach that would in essence ignore the permissions, can this be done from the installation medium or do I need to fetch myself one or another boot CD and do it from there?

Please keep your do-not-compress-system-files comments at home, thank you!

nc4pk
  • 9,037
  • 14
  • 59
  • 71
Tamara Wijsman
  • 57,083
  • 27
  • 185
  • 256
  • 1
    You may know all the reasons not to compress system files, but for the benefits of others who might read this question: *Do not compress system files*. If you do, you can get into a situation where files that the system needs to read in order to decompress files are themselves compressed, leaving the system unbootable or in various states of unusable. – David Schwartz Apr 24 '12 at 09:17
  • @DavidSchwartz: I'll debug that case if it would happen. :) – Tamara Wijsman Apr 24 '12 at 09:51
  • 2
    If it were easy to ignore permissions, then malware would have an easy path to root privileges. You might be able to do it from a ERD commander boot cd, not sure. – Moab Apr 24 '12 at 11:10
  • @Moab: Well, inside the OS there surely won't be any easy approach. I was looking for something outside that, it wouldn't be so hard to just ignore the ACL entries and have *full power* access to the disk. – Tamara Wijsman Apr 24 '12 at 11:12
  • You'd have to do it external to the OS, so I imagine even the installation medium may prevent you. Is it because the files are ATTRIB +S that you're being prevented? If so, there may not be an easy way around this using built-in utilities. –  Apr 24 '12 at 17:31
  • @RandolphWest: Worst case I would have to remember the ACL, do a `compact` and write the ACL back. – Tamara Wijsman Apr 24 '12 at 17:35
  • You don't need to "remember" the ACL at all. Provided you don't have a long list, Robocopy (I think?) remembers ACLs in a file for you, which you can apply after whatever it is you're doing. –  Apr 24 '12 at 17:37
  • @RandolphWest: Well, I was referring to some sort of script instead of pure human remembering. Dunno if Robocopy can copy ACLs on its own in some way. But that would be an easy / interesting approach if it worked. In any case, I hope that most files were just in use when I do a second take on this... – Tamara Wijsman Apr 24 '12 at 17:39
  • I guessed as much, hence the quotes around "remember". But if I'm right, Robocopy does a pretty good job of recording ACLs. However, it does have a hard limit that I ran into, which escapes me now. I think it was in the thousands. –  Apr 24 '12 at 17:40

0 Answers0