0

I have listed a section of text files using my apache tomcat service.

I had enabled the directory listings in web.xml and I tried to edit one of the text files in my notepad++, but it was read only and hence I could not edit.

Is there a way that I can make these files write-able where I can just use the links and write or edit them either using notepad++ or geneos.

I tried giving the files "777", but still it did not work. Can someone please help here?

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
N Deepak Prasath
  • 385
  • 2
  • 4
  • 13

1 Answers1

1

You have enabled directory listing. Which does exactly what you experience: It lists a directory's content.

You're asking for upload capabilities, which are not part of the directory listing feature. In fact, doing so would open a can of worms: What's up with concurrent changes to a file by two different people? Who'd win? Do you need locks? What kind of access control? Surely you don't want publicly writable content (as you indicate by chmod 777)

In other words: No, you can't achieve what you expect by enabling directory listing. How to do that is way beyond the scope of a stackoverflow question, and frankly, I'd recommend installing software that provides the capability. There are solutions that provide this feature and run on tomcat, but also some that run without.

And no, I won't recommend any of them, as I don't know your constraints and it'd be off topic on stackoverflow.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • Thanks Olaf. We have a tool which locks the file and does not allow multiple people editing the file at the same time. Can I request you to share the tool that would to do this with tomcat? – N Deepak Prasath Jun 11 '20 at 11:22
  • You did read my last sentence, right? Nevertheless, if you look at my profile page, you'll see an affiliation with Liferay, but as I still don't know your constraints and it still would be off topic on stackoverflow: No, I won't recommend any. – Olaf Kock Jun 11 '20 at 11:29