RFS delete gives KErrPathNotFound

Login to reply to this topic.
Fri, 2008-08-01 10:57
Joined: 2008-05-23
Forum posts: 59

Hi All,

Can I delete a file which belongs to another process??

My process has UIDX

From this process, I am trying to do

Rfs.delete(\epoc32\...\private\UIDY\a.txt)

This gives KErrPathNotFound. I understand the file is in other process's UID?? But I need to do this.. Could anyone suggest?

Thanks,
Chandru


Started my Journey in Symbian - http://celluleus.blogspot.com/


Fri, 2008-08-01 11:03
Joined: 2008-06-23
Forum posts: 85
Re: RFS delete gives KErrPathNotFound

You'll need the AllFiles capability to delete files in the private area of other applications.

Fri, 2008-08-01 11:19
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Thank Ivsti,

what does Capability ALL means?? Does it have Allfiles included??

I have tried including Allfiles.. but still i get the problem Sad


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 11:42
Joined: 2007-08-29
Forum posts: 295
Re: RFS delete gives KErrPathNotFound


AllFiles Capability means

Grants visibility to all files in the system and extra write access to files under /private.


Thanks & Regards
Ram

Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++

Fri, 2008-08-01 12:53
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

But still its not working.. any idea??

CAPABILITY ALL AllFiles

This is the line in my mmp.


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 13:25
Joined: 2007-08-29
Forum posts: 295
Re: RFS delete gives KErrPathNotFound

Hi,

which SDK and IDE you are using. To understand capabilities you can see this link.

http://www.forum.nokia.com/main/platforms/s60/capability_descriptions.html


Thanks & Regards
Ram

Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++

Fri, 2008-08-01 13:58
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Thanks Sahu.

I have another doubt.

I have a dll and associated mmp file, in which i have included AllFiles capability. But the interface in which the delete function fails is called from other app (an .exe).

In this scenario, Do we need to have the AllFiles capability with the .exe's mmp file??


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 14:11
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2009
Re: RFS delete gives KErrPathNotFound

I have a few question regarding your problem:

  • Do you understand what capability AllFile is and the requirements needed to access it ?
  • Shouldn't a capability issue return KErrPermissionDenied instead of KErrPathNotFound ?
  • Do you understand how the file system works in emulator ? (and thus that Delete(_L("C:\\*.**") won't delete anything in the root directory of your hard drive. And also that you probably want to Rfs.delete(c:\\private\\UIDY\\a.txt) instead of Rfs.delete(\epoc32\...\private\UIDY\a.txt)


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Fri, 2008-08-01 14:31
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Thanks for the response eric.

Yep I have clear idea about the differnce between emulator file system and my windows file system Smiling

KErrPathNotFound - I get only this error

And regarding the understanding of Allfiles capability.. Its logical that one process or app can not delete the private files of the other. So, it needs an extra higher level capability to access other process's private directory. That particular capability is called as "AllFiles". Is that all about?? please correct if I am wrong.

Sorry I couldnt find time to go through the article about the capabilities. Probably i can revisit my understanding after reading that.

Thanks,
Chandru


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 14:50
Joined: 2007-08-29
Forum posts: 295
Re: RFS delete gives KErrPathNotFound


The capabilities that an application requires can be confirmed in the S60 emulator. When the option "Enable Debug Security Messages" and "Enable EPOCWIND.OUT Logging" are selected in the emulator's Preferences dialog (or PlatSecDiagnostics set to ON and LogToFile set to 1 in the emulator’s epoc.ini file), a log file is created in the Windows “temp” folder called epocwind.out that includes warning messages indicating the capabilities needed by the application.


Thanks & Regards
Ram

Symbian OS 9.1,S60 3rd edition MR,and Carbide.C++

Fri, 2008-08-01 17:49
Joined: 2007-09-23
Forum posts: 159
Re: RFS delete gives KErrPathNotFound

Its all very well you adding the AllFiles capabilites to your project and running in on the emulator, and you will be able to run it on *your* phone. But the simple fact is you won't be able to run it on anybodies elses phone unless you get your app signed. And the chances of you getting an app signed with AllFiles is very very slim.

Fri, 2008-08-01 20:43
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Hi RB_Sahu,

I am very much aware of that epocwind.out. Infact I have checked for those warning message. And I didnt get any.

- Chandru


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 20:45
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Numpty_Alert,

Yes. your point seems to be sounding good.

But at the same time, Is there anyother way to delete a file which is privately owned by other process.

- Chandru


Started my Journey in Symbian - http://celluleus.blogspot.com/

Fri, 2008-08-01 21:46
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2009
Re: RFS delete gives KErrPathNotFound

No. That's why there is platform security... so that a process can have its file and prevent others from accessing it.


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Fri, 2008-08-01 21:52
Joined: 2008-05-23
Forum posts: 59
Re: RFS delete gives KErrPathNotFound

Thanks Eric. Then probably I need to request the "file owning process" to delete the file from the "process which wants to delete".


Started my Journey in Symbian - http://celluleus.blogspot.com/

Sat, 2008-08-02 18:29
Joined: 2006-05-08
Forum posts: 162
Re: RFS delete gives KErrPathNotFound

One reason platsec diagnostics might be missing is because of the rather conservative default settings of the S60 emulator. See http://www.tanzim.co.uk/2008/07/06/setting-up-the-s60-sdk-for-development/


  • Login to reply to this topic.