×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    "unable to execute due to security reasons" error

    hi i m getting "unable to execute due to security reasons" error while running my prog in the device n the capability checker shows only read device data and "dependant" for RFile.open Rfile.Replace what capablities r required for RFile ???
    i hav used readdevice data, write device data ,network services,read userdata and write user data.

    when i try enable epocwind.out throught the emulator it gives an error which says cannot start ecmt manager what should i do to c the epocwind.out file

    pls help

    i m using carbide 2.0
    -chandan

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    Quote Originally Posted by chank_13 View Post
    when i try enable epocwind.out throught the emulator it gives an error which says cannot start ecmt manager what should i do to c the epocwind.out file
    Apply this solution: http://wiki.forum.nokia.com/index.ph...ge_in_emulator

    And see what does EpocWind.out file complains. Also show your .mmp file here.
    Nokia Developer Wiki Moderation team

  3. #3
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    hi thanks for replying i m able to open the epoc file now will check it n post another msg if i hav a prob thank U
    -chandan

  4. #4
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    i m getting these warning's in the epocwind.out file

    14.345 *PlatSec* WARNING - Capability check would have failed - A Message (function number=0x0000001e) from Thread W[2002e26b]0002::W, sent to Server !FileServer, was checked by Thread EFile.exe[100039e3]0001::Main and was found to be missing the capabilities: AllFiles . Additional diagnostic message: File Open in private path: C:\private\EFAF15C9\imsi1.txt


    14.415 *PlatSec* WARNING - Capability check would have failed - A Message (function number=0x00000010) from Thread W[2002e26b]0002::W, sent to Server !FileServer, was checked by Thread EFile.exe[100039e3]0001::Main and was found to be missing the capabilities: AllFiles . Additional diagnostic message: \private\EFAF15C9\imsi1.txt Used to call: Make Directory

    14.415 *PlatSec* WARNING - Capability check would have failed - A Message (function number=0x00000020) from Thread W[2002e26b]0002::W, sent to Server !FileServer, was checked by Thread EFile.exe[100039e3]0001::Main and was found to be missing the capabilities: AllFiles . Additional diagnostic message: \private\EFAF15C9\imsi1.txt Used to call: Replace File

    WHAT SHOULD I DO I CANT ADD "ALLFILES" CAPABILITY and i use RFile for creating and writing files into the private folder just as in the helloworld example
    -chandan

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    Quote Originally Posted by chank_13 View Post
    Main and was found to be missing the capabilities: AllFiles . Additional diagnostic message: File Open in private path: C:\private\EFAF15C9\imsi1.txt
    Are you sure you are accessing private directory of your application? Note that you cannot access private folders of other applications.

    Anyway, show your .mmp file here.
    Nokia Developer Wiki Moderation team

  6. #6
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    my mmp file


    TARGET W.exe
    UID 0x100039CE 0x2002E26B
    VENDORID 0
    TARGETTYPE exe
    EPOCSTACKSIZE 0x5000

    SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom \Epoc32\include\libc
    USERINCLUDE ..\inc ..\data

    SOURCEPATH ..\data
    START RESOURCE W.rss
    HEADER
    TARGETPATH resource\apps
    END //RESOURCE

    START RESOURCE W_reg.rss
    TARGETPATH \private\10003a3f\apps
    END //RESOURCE

    START RESOURCE 2002E26B.rss //ck
    END

    LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib
    LIBRARY commonengine.lib efsrv.lib estor.lib eikcoctl.lib eikdlg.lib
    LIBRARY eikctl.lib bafl.lib fbscli.lib aknnotify.lib aknicon.lib
    LIBRARY etext.lib gdi.lib egul.lib insock.lib
    LIBRARY ecom.lib InetProtUtil.lib http.lib esock.lib etel3rdparty.lib msgs.lib smcm.lib gsmu.lib mtur.lib

    LANG 01

    START BITMAP W.mbm
    HEADER
    TARGETPATH \resource\apps
    SOURCEPATH ..\gfx
    SOURCE c12,1 list_icon.bmp list_icon_mask.bmp
    SOURCE c24 Logo.bmp Back.bmp
    END

    SOURCEPATH ..\src

    #ifdef ENABLE_ABIV2_MODE
    DEBUGGABLE_UDEBONLY
    #endif

    SOURCE WContainerView.cpp WContainer.cpp WApplication.cpp WAppUi.cpp WDocument.cpp WSettingItemList.cpp WSettingItemListSettings.cpp WSettingItemListView.cpp WSettingItemList2View.cpp WSettingItemList2.cpp WSettingItemList2Settings.cpp WListBox2View.cpp WListBox2.cpp WListBox3.cpp WListBox3View.cpp WContainer2.cpp WContainer2View.cpp WListBoxView.cpp WListBox.cpp IMEIApp.cpp IMSIApp.cpp NetworkApp.cpp WContainer3.cpp WContainer3View.cpp WContainer4View.cpp WContainer4.cpp SMShandler.cpp

    CAPABILITY ReadDeviceData ReadUserData WriteDeviceData



    i hav used protected UID and previously had 5 capabilities including "network services" and "write user data"
    -chandan

  7. #7
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,169

    Re: "unable to execute due to security reasons" error

    change the path to be for 2002E26B instead of EFAF15C9.

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    Quote Originally Posted by chank_13 View Post
    my mmp file


    TARGET W.exe
    UID 0x100039CE 0x2002E26B
    Your UID3(SID) is 0x2002E26B here and you are trying to access private folder 0xEFAF15C9.

    Change the file path to this and it should work.
    Code:
    C:\\private\\2002E26B\\imsi1.txt
    Nokia Developer Wiki Moderation team

  9. #9
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    i changed the file folder name to my UID name

    but now it gives me a "system error(-12)" and exits

    i guess it is not able to create dat file

    and i also get ALLOC : 2c73118c0 as a pop up after the app exits on the emulator

    what should i do???
    -chandan

  10. #10
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    Create a folder using MkDirAll method. Create HelloWorld GUI application from Carbide.c++ and open its *AppUi.cpp file. You will see such an implementation in the ConstructL().

    Code:
    _LIT(KFileName, "C:\\private\\2002E26B\\imsi1.txt");
    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    ...
    ...
    Nokia Developer Wiki Moderation team

  11. #11
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    now i m getting "system error(-1)" n the app exits

    this is my code

    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    {
    return;
    }

    RFile rFile;

    //Open file where the stream text is
    User::LeaveIfError(rFile.Open(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText));//EFileShareReadersOnly));// EFileStreamText));
    CleanupClosePushL(rFile);

    // copy stream from file to RFileStream object
    RFileReadStream inputFileStream(rFile);
    CleanupClosePushL(inputFileStream);

    // HBufC descriptor is created from the RFileStream object.
    HBufC* fileData = HBufC::NewLC(inputFileStream, 32);

    TBuf<25> fdata;
    fdata = *fileData;

    CleanupStack::PopAndDestroy(3); // filedata, inputFileStream, rFile
    -chandan

  12. #12
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    Try with this. And read about MkDirAll in the SDK help.

    Code:
    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    {
    return;
    }
    
    RFile rFile;
    err = rFile.Open(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText);
    if (err == KErrNotFound)// file does not exist - create it
    { 
        err = rFile.Create(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText);
    }
    ....
    Last edited by kiran10182; 2010-02-26 at 11:36. Reason: updated the code
    Nokia Developer Wiki Moderation team

  13. #13
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    now i m getting "system error (-25)" after replacing dat line code



    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    {
    return;
    }

    RFile rFile;

    //Open file where the stream text is
    User::LeaveIfError(rFile.Replace(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText));//EFileShareReadersOnly));// EFileStreamText));

    CleanupClosePushL(rFile);

    // copy stream from file to RFileStream object
    RFileReadStream inputFileStream(rFile);
    CleanupClosePushL(inputFileStream);

    // HBufC descriptor is created from the RFileStream object.
    HBufC* fileData = HBufC::NewLC(inputFileStream, 32);

    TBuf<25> fdata;
    fdata = *fileData;

    CleanupStack::PopAndDestroy(3); // filedata, inputFileStream, rFile
    -chandan

  14. #14
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: "unable to execute due to security reasons" error

    See, I have updated the code.
    Quote Originally Posted by kiran10182 View Post
    Try with this. And read about MkDirAll in the SDK help.

    Code:
    TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
    if ((KErrNone != err) && (KErrAlreadyExists != err))
    {
    return;
    }
    
    RFile rFile;
    err = rFile.Open(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText);
    if (err == KErrNotFound)// file does not exist - create it
    { 
        err = rFile.Create(CCoeEnv::Static()->FsSession(),KFileName, EFileStreamText);
    }
    ....
    Nokia Developer Wiki Moderation team

  15. #15
    Registered User
    Join Date
    Oct 2009
    Location
    pune
    Posts
    42

    Re: "unable to execute due to security reasons" error

    still getting same error 25

    what is happenning
    -chandan

Similar Threads

  1. "Unable to execute file for security reasons" - background?
    By theusualsuspect in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2009-04-18, 17:15
  2. Error Message:"Unable to execute file for security reasons"
    By seemaK in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 5
    Last Post: 2008-04-02, 07:12
  3. Replies: 13
    Last Post: 2007-03-27, 11:35
  4. Carbide.vs 2.01 Registration Problem
    By baykal in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-12-22, 16:55
  5. C-code..unable to make sis
    By Symbian_Neil in forum Symbian
    Replies: 9
    Last Post: 2006-12-02, 07:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×