Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - how to run a prebuilt app on QNX?: (7 Items)
   
how to run a prebuilt app on QNX?  
Hi QNX,

I have bootup QNX on target board from SD card, and there is also a prebuilt/cross-compiled application executable on SD
 card. Then I mounted SD card to filesystem by following commands,

     mount -t dos /dev/hd0t11 /sd
     cd /sd
     chmod 777 myapp
     ls -al 

        -rw-rw-rw-  1 root      0             25633 Mar 05  2018 myapp

chmod is not able to change the mode, and myapp is still not runnable.

Please advise, thanks in advance

Mike
Re: how to run a prebuilt app on QNX?  
Hi,

this is because the DOS FAT file system has no UNIX-like permissions. Try
   mount -t dos -oexe=all /dev/hd0t11 /sd

That should set the x bits on all files on your sd card. See fs-dos.so docs for more options...

Cheers,
Thomas
Re: how to run a prebuilt app on QNX?  
An alternate way is to put "dos exe=all" on the startup line of the devb-* resource manager.  For example,

# devb-eide dos exe=all qnx6 sync=optional cam quiet

BSP's seem to favor this approach - perhaps because it works with "automount".  But both ways work.
RE: how to run a prebuilt app on QNX?  
Needless to say (but I'll say it), both of these options are highly insecure, essentially making the execute bit useless
 (as it gets applied to all files on the medium).
If you don't have a disk with a file system that provides proper permissions (and user/group ownership) you can always 
copy the executable to /dev/shmem and run it from there.

--Elad
________________________________________
From: Dennis Kellly [community-noreply@qnx.com]
Sent: March 5, 2018 8:16 AM
To: ostech-core_os
Subject: Re: how to run a prebuilt app on QNX?

An alternate way is to put "dos exe=all" on the startup line of the devb-* resource manager.  For example,

# devb-eide dos exe=all qnx6 sync=optional cam quiet

BSP's seem to favor this approach - perhaps because it works with "automount".  But both ways work.




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post118647
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: RE: how to run a prebuilt app on QNX?  
Also, if you want to avoid all files being executable, there is 
   exe=system
— use the DOS “system” attribute to indicate which files are executable.
Re: how to run a prebuilt app on QNX?  
Execute bits don’t really affect security at all, at best they prevent you from accidently executing things that likely
 won’t execute anyway.  In this case there likely is no security but that’s a function of having an unverifiable file 
system.

On 2018-03-05, 8:15 AM, "Elad Lahav" <community-noreply@qnx.com> wrote:

    Needless to say (but I'll say it), both of these options are highly insecure, essentially making the execute bit 
useless (as it gets applied to all files on the medium).
    If you don't have a disk with a file system that provides proper permissions (and user/group ownership) you can 
always copy the executable to /dev/shmem and run it from there.
    
    --Elad
    ________________________________________
    From: Dennis Kellly [community-noreply@qnx.com]
    Sent: March 5, 2018 8:16 AM
    To: ostech-core_os
    Subject: Re: how to run a prebuilt app on QNX?
    
    An alternate way is to put "dos exe=all" on the startup line of the devb-* resource manager.  For example,
    
    # devb-eide dos exe=all qnx6 sync=optional cam quiet
    
    BSP's seem to favor this approach - perhaps because it works with "automount".  But both ways work.
    
    
 

Re: how to run a prebuilt app on QNX?  
Thank you all QNX experts. I have learned a lot.

Best