镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Access Denied #1237

Open
Open

Description

I have all permission. But still shows error.
Possible Unhandled Promise Rejection (id: 2):
Error: ENOENT: /storage/emulated/0/Download/DataBackup/prf.db: open failed: EACCES (Permission denied), open '/storage/emulated/0/Download/DataBackup/prf.db'

THIS IS MY CODE.

const onShare=()=>{

const full_path = RNFS.DownloadDirectoryPath + "/DataBackup/prf.db";
RNFS.exists(full_path)
.then((exist)=>{
  if(exist){
      RNFS.moveFile(full_path, RNFS.DownloadDirectoryPath+"/prf_new.db");
      console.log("exist"+RNFS.DownloadDirectoryPath);
      console.log(RNFS.DownloadDirectoryPath);
    
  }else{

    console.log("not exist");

  }
}).catch((error)=>{
  console.log(error);
})

}

N.B: when I run the create folder function, the is created successfully in Downlaod folder.
RNFS.exists(RNFS.DownloadDirectoryPath + "/DataBackup")
.then(exists => {
if (!exists) {
RNFS.mkdir(RNFS.DownloadDirectoryPath + "/DataBackup")
}}).catch(error => {
console.error("Error checking MEMBER directory existence:", error);
});

Activity

  1. UmairK11 commented on Mar 13, 2025

    @UmairK11

    @nehalasim i face the same Issue any fix please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions