Linux executable permission

Hi Team,

I am adding an executable binary for linux environment (provided by SoC vendor) to my framework. Since I am currently pushing my package from windows environment, How do I make sure that framework retains the 755 permission to execute file when package is uploaded to PIO Registry? Or something I should be mentioning in the package.json file itself?

Ajay Bhargav

tar.gz packages (as normally produced by pio package pack) are uploaded to the registry, which retain their file permission bits for Linux, and should be ignored for Windows. So it is should all just-work.

E.g., when you look at you can clearly see all file permissions being retained.

1 Like

Hi @maxgerhardt I will try to run pack first before publish, just to be sure.
since windows does not know permission for files, i think this activity should be done on linux instead. I tried WSL on windows but somehow I get error.

Usage: pio [OPTIONS] COMMAND [ARGS]...
Try 'pio -h' for help.

Error: No such command "access"

No matter what command I run, I get this same error. I installed platformio using pip3 so I assume it takes right python version.

If you are packaging stuff for Linux, best to do it on Linux to presever everything. For Windows, it doesn’t matter.

You tried executing pio upgrade --dev to make sure you have the latest version?

This is generally not recommended – you may try to pip3 uninstall platformio it again and use the intended installation method.

1 Like

This worked flawlessly. Thank you. I hope doing packaging via WSL on windows should not be a problem.

WSL is just a fast virtual machine (managed by the Windows Hyper-V component), it’s a real Linux system within its own right, it should be absolutely fine.

1 Like