my dog learned polymorphism*
The moose likes Features new in Java 7 and the fly likes Java 7 API Files.getowner returns S-1-5-21-1256266458-1619763451-1018739985-1218 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Features new in Java 7
Bookmark "Java 7 API Files.getowner returns S-1-5-21-1256266458-1619763451-1018739985-1218" Watch "Java 7 API Files.getowner returns S-1-5-21-1256266458-1619763451-1018739985-1218" New topic
Author

Java 7 API Files.getowner returns S-1-5-21-1256266458-1619763451-1018739985-1218

priya pm
Greenhorn

Joined: Mar 10, 2009
Posts: 2
Hi. i'm accessing the files residing on my remote hp-ux system on my windows system through the samba map-drive. When i use the api Files.getowner() for a file under the C:, it returns the owner of the file. but if i use the same API for a file under the map-drive, it returns a sequence of digits like S-1-5-21-1256266458-1619763451-1018739985-1218.
can anyone tell me how to obtain the owner of the file in the samba map drive?
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

As far as I know, this is an internal user ID which Windows displays when it cannot - for some reason - translate it to the real user name.

I don't know how Samba provides file and folder owners to Windows, but I'd say that Windows are unable to find that user. That user exists on unix, it probably doesn't have any relationship to the Windows machine accessing the share. You'd probably have to set both systems in a way which would allow them to share user definitions (eg. put them both to a Windows domain) to be able to display the user name on Windows. (Just guessing.)
 
Consider Paul's rocket mass heater.
 
subject: Java 7 API Files.getowner returns S-1-5-21-1256266458-1619763451-1018739985-1218
 
Similar Threads
Java IO problems
need help sharing a file in redhat linux
Save file to remote computer on same LAN
Restoring "$Recycle.bin" files
How to connect to samba server from window xp ?