SquashFs an FileSystemPermission

Mar 19, 2012 at 11:16 AM

Hello,

im working on a project for an embedded device. On this device applications are distributed in a packaged format - utilizing squashfs as filesystem for this container. When a application is "run" on the device, the squashfs filesystem is mounted into a temporary path and a specified shellscript is executed that starts the actual application.
I'm trying to build a "package creator" using .Net4 on Windows. I managed to create a packe sucessfully in terms of that the package is reckognized by the embedded linux, and it tries to run it. As far as the debug log goes the squashfs image seems to be mounted without problems, but when it comes to executing the shellscript (bash) I only get the error "permission denied".
I currently stuck at getting the Parameter for the "SquashFileSystemBuilder..::..AddFile Method (String, String, Int32, Int32, UnixFilePermissions, DateTime)" function right, but I horribly fail with it. If I mount the container manually and use "chmod +x" on the shellscript, it works as intended.


Any Ideas anyone ?

Thanks in adavance

Mar 20, 2012 at 12:52 PM

The default permissions are:

DefaultFilePermissions = UnixFilePermissions.OwnerRead | UnixFilePermissions.OwnerWrite | UnixFilePermissions.GroupRead | UnixFilePermissions.GroupWrite;
I think you need to add OwnerExecute and/or GroupExecute
so call yourfilesystemvariable.DefaultFilePermissions = the correct permissions you want.

Cheers,
Bill 
Mar 20, 2012 at 1:31 PM

Thanks a lot, works like Charm !