Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paket doesn't preserve file permission #2893

Closed
somdoron opened this issue Nov 11, 2017 · 4 comments
Closed

paket doesn't preserve file permission #2893

somdoron opened this issue Nov 11, 2017 · 4 comments

Comments

@somdoron
Copy link

somdoron commented Nov 11, 2017

Description

I have a package which have one linux executable file which I pack with paket.

However paket don't preserve the executable permission of the file. So when restoring the package the file is not executable and I have to manually set the file permission.

Repro steps

  1. Pack one executable file to output directory, example of paket file
type file
id package_example
version 0.0.0.1
authors XXX
files
  executable ==> output
dependencies
  Baseclass.Contrib.Nuget.Output >= 2.4.0
  1. Restore the package

Expected behavior

The file executable permission is preserved

Actual behavior

The file is not executable

Known workarounds

manually change the file permission in the packages directory.

@MiloszKrajewski
Copy link
Contributor

I don't think it is paket bug. I understand that .nupkg is actually a zip file so storing unix permissions is not supported. I don't think there is possibility to put permissions in .nuspec file either.

As your symptoms are real (no unix permissions) you diagnosis is most likely wrong: it has nothing to do with paket. It is zip/nuspec format.

@somdoron
Copy link
Author

I think you can, but the .net ZipArchive doesn't support that. Anyway thanks, I will close it for now.

@matthid
Copy link
Member

matthid commented Nov 12, 2017

Related dotnet/templating#1028

@matthid
Copy link
Member

matthid commented Nov 12, 2017

.nupkg is actually a zip file so storing unix permissions is not supported

Actually, zip supports file attributes. It could be possible to make paket support that scenario, the only question is if nuget.exe still works with such packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants