• Post Reply Bookmark Topic Watch Topic
  • New Topic

upload file to windows share folder running on unix  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi, I am having requirement to upload the files into windows share folder, It works fine If I run the application on windows, but we moved the application to UNIX, so right now the client has to upload the files to windows shareholder , server is running on the UNIX,

as I am using the simple File file = new File(//share/shareholder),

so the problem is once we move to UNIX, how can I handle ., any example will really helpful.

Thanks
Srikanth
 
author & internet detective
Marshal
Posts: 37518
554
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Srikanth,
Welcome to JavaRanch!

I'm not sure if this is a Java question or a UNX one. I'm going to move it to our UNIX forum where people are more likely to know than here in JSP.
 
Saloon Keeper
Posts: 18800
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Install the Samba client on the Linux system and define a mountpoint where you want your Windows share to be mounted.

Add an entry to /etc/fstab to cause the share to be mounted at boot time (you can mount manually, but that gets old after a while). You want do make it do something like this:

mount -t cifs //winhost/sharename /mnt/winshare

Ensure that you have appropriate file access and firewall rights. Once you have the ability to access the share from the command line, the webapp server can reference it exactly the same as it would for local files.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!