The International Simutrans Forum

 

Author Topic: User privilegies in last Pak64 distribution wrong  (Read 4147 times)

0 Members and 1 Guest are viewing this topic.

Offline paco_m

  • *
  • Posts: 170
User privilegies in last Pak64 distribution wrong
« on: January 13, 2013, 03:01:32 PM »
If you download and extract the Pak64 112.1 from
http://forum.simutrans.com/index.php?topic=11154
all user privilegies (owner, group, others) are set to "no access".

This causes a lot of problems:
1) you can not extract the Zip archive using the directory/folder structure it contains because after creating the directory "pak" it fails to write any file inside this directory because the directory doesn't ahve write permission
2) after fixing this Simutrans won't recognize the installed pak because all the files are unaccesable
The result is that unless you change the permission of every file and directory of Pak64 Simutrans won't load the pak.
« Last Edit: January 13, 2013, 03:08:06 PM by paco_m »

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: User privilegies in last Pak64 distribution wrong
« Reply #1 on: January 13, 2013, 04:21:33 PM »
Paco_m
Please speak those Problem in the German forum on.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: User privilegies in last Pak64 distribution wrong
« Reply #2 on: January 13, 2013, 10:02:17 PM »
I used zip on windows. I doubt that it contians a valid unix ID block, and thus has access rights at all. I could unpack it (on the command line) quite well one unbuntu, this I rather suspect you zip program to wrongly interpret the data.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: User privilegies in last Pak64 distribution wrong
« Reply #3 on: January 14, 2013, 06:03:42 AM »
Tested in my Linux box and unzipping went fine, but files and directories lack permissions so I can't access them afterwards. I tried to create another zip file on my Windows computer, and it's files got normal (default) persmissions when extracted on my Linux box.

So either (or possibly both) prissi's zip program puts bogus Linux permission information into the zip file, or my program generates fake but reasonable Linux permissions information. If (just) the latter, then at least two Linux zip programs have big issues dealing with non-Linux zip files, which seems a bit odd.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: User privilegies in last Pak64 distribution wrong
« Reply #4 on: January 14, 2013, 09:56:18 AM »
I will rezip it on linux then.

Offline paco_m

  • *
  • Posts: 170
Re: User privilegies in last Pak64 distribution wrong
« Reply #5 on: January 15, 2013, 11:06:42 AM »
The pak128 and pak64.german packages are working without any issues (I only tried this two), so packing the pak64 the same way should solve it.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: User privilegies in last Pak64 distribution wrong
« Reply #6 on: January 16, 2013, 10:23:09 AM »
I paked it already again, this time using 7zip. Does the error still persist?

pak128 is anyway built on linux. Pak64.german was actually paked by exactly the same program as pak64, since I did both.

Offline paco_m

  • *
  • Posts: 170
Re: User privilegies in last Pak64 distribution wrong
« Reply #7 on: January 16, 2013, 11:49:17 AM »
Everything ok with the new packages :)

Offline captain crunch

  • *
  • Posts: 116
Re: User privilegies in last Pak64 distribution wrong
« Reply #8 on: August 10, 2013, 05:48:31 PM »
The permissions are again unset in simupak64-112-3.zip (excerpt):
Code: [Select]
$ ls -nl simutrans/pak | head
total 10868
---------- 1 1000 1000  48169 May 17 20:43 bridge.ClassicRail.pak
---------- 1 1000 1000  52879 May 17 20:43 bridge.ClassicRoad.pak
---------- 1 1000 1000  18705 May 17 20:43 bridge.MaglevBridge.pak
---------- 1 1000 1000  26645 May 17 20:43 bridge.ModernRoad.pak
---------- 1 1000 1000  18675 May 17 20:43 bridge.MonorailRamp.pak
---------- 1 1000 1000  18239 May 17 20:43 bridge.PowerBridge.pak
---------- 1 1000 1000  57455 May 17 20:43 bridge.Schiffhebewerk.pak
---------- 1 1000 1000  40279 May 17 20:43 bridge.SteelRail.pak
---------- 1 1000 1000  28545 May 17 20:43 bridge.ViaductRail.pak

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5531
  • Languages: EN, NO
Re: User privilegies in last Pak64 distribution wrong
« Reply #9 on: August 10, 2013, 07:33:29 PM »
Since file permissions is not part of the zip standard (as far as I can see), one should think unzip programs would handle missing permissions better. I guess the zip file says it does actually have UNIX file permissions, but still. It might be that the zipper tries to do a clever mapping from Windows to UNIX file permissions, but screws up over the fact that files on Windows can be set to inherit permissions, which means they usually have no permissions of their own.