• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Accessing files from Unix Server by passing credentials

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a project requirement where a server side code running on a App Server (WebSphere) is required to read/write files from/to an Unix based file server. This Unix based file server has NFS running on it. Our dev team wrote a simple Java IO code that accesses the files from a shared folder on this unix system. This shared folder has access to all.

However, when the access is restricted only to one user, say UserA, then the code fails and throws java.io Access is Denied exception. We have logged in to this app server as UserA still it doesnt help. I think the app server's service starts even before we login and thus starts as a Local System User.

java.io package does not have any class/method that accepts user credentials. I am currently looking in to WebNFS api. In the meanwhile, if anyone has successfully resolved this before, kindly let me know.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JCIFS can handle this problem for SMB (Samba) shares; perhaps it can also work for NFS.
 
ash shinde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is CIFS not specific to Windows based system? Our Unix file server has NFS installed on it and thus I thought we should try out Extended File IO API i.e. com.sun.xfile APIs.
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if it is for Windows only, but I did just now find out it is SMB only.
 
reply
    Bookmark Topic Watch Topic
  • New Topic