Forum Stats

  • 3,826,780 Users
  • 2,260,707 Discussions
  • 7,897,072 Comments

Discussions

Creating directory using java -8

fd6c5393-8a13-4c67-8c51-7f64e607cb87
edited Jun 1, 2017 11:04PM in Java Programming

Hi all,

I am using java 8 in my application & which require creating a directory in given location of the file system. But the problem is jvm user( the user who run the java program) don't have permission to create the file & directories in file system. As i think it is obvious to fail the creation of the file & folder without having jvm user permission to create files. Unfortunately it is not allowed to give the permission for jvm user.

So, I am looking for your valuable solution for such scenarios. Alternatively FTP would be an option. Kindly give me & expert opinion on this.

Thanks

Nuwan

rpc1

Answers

  • handat
    handat Member Posts: 4,688 Gold Crown
    edited Jun 1, 2017 7:56PM

    If your jvm user does not have access, then you will need to delegate that to some other user/service that can and then call it to do it.

  • Unknown
    edited Jun 1, 2017 11:04PM

    I am using java 8 in my application & which require creating a directory in given location of the file system. But the problem is jvm user( the user who run the java program) don't have permission to create the file & directories in file system.

    Sorry - you can't have it both ways.

    If the requirement is for the Java app to create folders 'in given location' then it needs the privileges to do that.

    If the org doesn't want to grant the privileges than it can NOT insist on that requirement.

    rpc1
This discussion has been closed.