5

I know other people have asked this before, but none of the suggested solutions work. I think this is blocking me write access to a folder using java (not sure though). No matter what I do the box is always checked on every folder on every drive on my computer. I have tried unchecking it, unchecking it and saying yes to 'Apply to this folder and all subfolders...', I have run the 'attrib -r +s ' command and the 'takeown /f [path to folder] /r /d y' and 'icacls [path to folder] /grant administrators:F /T' commands. Neither made any difference.

I have rebooted and I have made sure the folder I'm trying this on has had full control permissions for my user, administrator and all users.

Any help here would be greatly appreciated.

Also note these files/folders are not actually read only for any other application including windows explorer. It's only java which is having a problem and that mightn't even be related.

enter image description here enter image description here

  • Try running the app as administrator, or, writing to a folder that is NOT at the root drive (C:). The root C: is protected by UAC. – rrirower Feb 23 '15 at 13:33
  • 2
    Regarding the first screenshot: superuser.com/questions/866120/… – Dawn Benton Apr 25 '15 at 14:18
  • In "'attrib -r +s", why +s? That would seem to make it a system file/folder. – Brian Carlton Feb 20 '17 at 17:38
3

You really can't unset Read-only attribute on any folder in Explorer: Explorer always shows Read-only attribute in indeterminate state (starting from Windows 7, if I remember correctly). Yet attrib will tell you whether Read-only attribute is set or not.

Read-only attribute on a folder does not affect whether a user can modify its contents or not. However, Read-only attribute is a special attribute for Explorer. If Read-only attribute is set, Explorer will search for desktop.ini inside the folder and loads it. For example, this way Documents, Pictures and other folder are localized in your user profile.


If the folder is writable using Explorer or Command Prompt, then you have access to write to that folder.

Can't any Java application write to the specified folder?
Is it only one Java app that can't?

So the problem is somewhere in the Java app.

For example, Java Web Start (JWS) apps can be executed in a sandbox which blocks the app from accessing arbitrary files and folders on the file system.

Without more details about the application, it's hard to guess why it can't write to this folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.