Welcome, Guest. Please login or register.

Author Topic: fixing executables that lost the executable flag  (Read 1721 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline DamageXTopic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
fixing executables that lost the executable flag
« on: May 15, 2009, 08:10:13 AM »
I restored all my files to my new A1200 that were backed up on a PC. It won't boot and nothing will run though because the 'executable' flag has been reset. Is there a program that can run through all 4000+ files and fix this?
 

Offline spirantho

Re: fixing executables that lost the executable flag
« Reply #1 on: May 15, 2009, 08:19:33 AM »
Not directly but you can do it with the list command. I can't remember the syntax exactly but :

Code: [Select]

LIST ALL LFORMAT "protect %f +e" >runme
execute runme


You may need a different parameter for the filename in list, but when you find the right one it'll work I think.

Of course it'll also mark all your data files as executable!
--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my shop! http://www.mutant-caterpillar.co.uk/shop/ - for 8-bit (and soon 16-bit) goodness!
 

Offline pVC

Re: fixing executables that lost the executable flag
« Reply #2 on: May 15, 2009, 09:02:15 AM »
Quote

spirantho wrote:
Not directly but you can do it with the list command. I can't remember the syntax exactly but :

Code: [Select]

LIST ALL LFORMAT "protect %f +e" >runme
execute runme



Doesn't "protect #? +e ALL" do the same?

In any case, it's not good idea to backup system/program files to "alien" filesystem as they are. Besides executable flags there are also scirpt and pure flags on many files etc. It's better to archive files before saving to other filesystem or make image with MakeCD with amiga attributes on and save the image or use dedicated backup program or... In my opinion the best way to backup is to have another media with amiga filesystem and "copy #? dest: all clone". Then you also preserve file dates and comments and everything.
Daily MorphOS user and Amiga active.
 

Offline spirantho

Re: fixing executables that lost the executable flag
« Reply #3 on: May 15, 2009, 09:05:35 AM »
I wasn't aware that Protect had an ALL flag but it wouldn't surprise me.

I agree though - all preservation should be done with a proper archive tool, such as LhA or LZX. That's the only sure way to get everything stored properly.
--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my shop! http://www.mutant-caterpillar.co.uk/shop/ - for 8-bit (and soon 16-bit) goodness!
 

Offline pVC

Re: fixing executables that lost the executable flag
« Reply #4 on: May 15, 2009, 09:15:40 AM »
Though LhA and LZX can take painfully long time on slow cpu or big systems. Other methods I described are better in that aspect. But it depends of your current situation always..
Daily MorphOS user and Amiga active.
 

Offline DamageXTopic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: fixing executables that lost the executable flag
« Reply #5 on: May 16, 2009, 04:54:09 AM »
Thanks for the help. My backup was an LHA but I was unable to extract it on the Amiga because a few files failed the CRC check and lha would give up as soon as it got to the first one. Is there a way to get around this?
 

Offline pVC

Re: fixing executables that lost the executable flag
« Reply #6 on: May 16, 2009, 07:56:59 AM »
Try to unpack it with LZX (it knows lha too). I think it continues after errors and only broken files will be left unpacked.
Daily MorphOS user and Amiga active.
 

Offline DamageXTopic starter

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
fixing executables that lost the executable flag
« Reply #7 on: May 18, 2009, 07:10:20 AM »
OK I used LZX and I think it was successful. Now my GVP Typhoon has to hurry up and get here! OS 3.9 can't do much with only 2MB of RAM.