• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing files from Unix Server by passing credentials

 
ash shinde
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
  • 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: 20822
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!