[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using Files Without Mounting A Share From Another System



On Apr 23, 2011, at 12:00 PM, Camaleón wrote:

> On Sat, 23 Apr 2011 11:04:20 -0400, Hal Vaughan wrote:
> 
>> On Apr 23, 2011, at 6:44 AM, Camaleón wrote:
> 
>>>> Does Java handle the SMB protocol on its own?  I know I can't list a
>>>> directory that way with ls, even with the Samba client package
>>>> installed.
>>> 
>>> Good question.
>>> 
>>> Nowadays it should handle smb:// or other network protocol just the
>>> same it does with http:// but maybe it has auto-imposed some
>>> limitations on linux environments (at least under windows you can
>>> launch a java JAR that is stored in a network share) or is just the JAR
>>> file has to be prepared to be run over the network (IIRC, there is a
>>> jCIFS library to that precisely purpose).
>> 
>> I tried, on the command line in Windows XP, "dir \\server\directory" and
>> it works, but SMB/CIFS is built in to Windows.  As far as I can tell,
>> there is no equivalent on Linux unless you use smbclient.  SMB is not
>> built into Linux and it seems without smbclient, Linux cannot access an
>> SMB share.
>> 
>> I've been searching, and it looks like there's a CIFS class for Java,
>> but it's not built-in to Java and is available at samba.org.
> 
> Yep... and it's quite strange.
> 
> I still don't know if it's a security measure or just a technical barrier 
> that needs the use of another applications to be bypassed. In fact, I can 
> run a ".jar" file over "smb://" using Nautilus but this is what I get:

Do you mean you could run the jar or that you tried to?

> 1/ Jar file is executed but it opens with file roller (archiver utility)
> 2/ When I try to change file permisson to make it executable I get an 
> error ("cannot change permissions to file.jar")

Did you try to change permissions from the server itself or from the client?  It sounds like you tried to change permissions from the client.

> All this done over a NTFS volume managed by a Windows host. Maybe a samba 
> share over a linux filesystem (ext3/4/reiser/xfs...) gives different 
> results... dunno :-?

I think Linux might give better control over things like permissions.  In my case, the server will be running Debian 6.x.


Thanks for trying that -- I'm still searching and testing, but I haven't gotten anything to work and I need to create a test jar file I can work with.



Hal

Reply to: