java - Can't delete or change specific file -


i have 1 particular file that, it's been written own process, can't deleted:

files.copy(source, destination, standardcopyoption.replace_existing); files.deleteifexists(destination); 

no matter try, get:

java.nio.file.accessdeniedexception: c:\programdata\faforever\bin\bssndrpt.exe     @ sun.nio.fs.windowsexception.translatetoioexception(unknown source) ~[na:1.8.0_45]     @ sun.nio.fs.windowsexception.rethrowasioexception(unknown source) ~[na:1.8.0_45]     @ sun.nio.fs.windowsexception.rethrowasioexception(unknown source) ~[na:1.8.0_45]     @ sun.nio.fs.windowsfilesystemprovider.impldelete(unknown source) ~[na:1.8.0_45]     @ sun.nio.fs.abstractfilesystemprovider.deleteifexists(unknown source) ~[na:1.8.0_45]     @ java.nio.file.files.deleteifexists(unknown source) ~[na:1.8.0_45] 

all other files, same user/group permission , owner, don't have problem. , no, file isn't opened, since copied there.

how can possibly be? how find out? (procmon gave "buffer overflow" no access violation or so) how can fix it?

you need change file properties not 'read only'

go file using: windows explorer -> right click -> properties.

change file permissions in bottom of dialog.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -