File Access through SMB Share

Asked by mwhager on 2008-11-14

We have a simple intranet site that was developed on a windows system. It is simple html which displays a listing of PDF files for the user to click on and then subsequently open. We use file://server_name/share/filename.pdf as the path to open the file from the intranet web page. Now, however, we need to access the same intranet web site over some ubuntu desktops. All of the samba stuff is set up correctly - we can browse our windows network and open the files directly from ubuntu's explorer. But when we go to firefox and open the browser and load the intranet - when we click on the pdf name we get an error. If we change the syntax to:
smb://server_name/share/filename.pdf - it works fine. However - we need syntax that will open the same file within a browser on both ubuntu and windows. Is there a syntax will work on both operating systems? Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

To have same syntax on Windows and Ubuntu to access to a share with the file:// command

I think you must create a mount point of the remote share on the local pc with the same name of remote pc
Something like this, using terminal:

sudo mkdir /server_name
sudo mkdir /server_name/share_name
sudo chown -R $USER.$USER /server_name
sudo mount -t cifs "\\\\server_name\\share_name" /server_name/share_name

You will get access using same syntax from Firefox and other applications to your
file://server_name/share_name/filename.pdf

Then you must also play with mount permission and other stuffs the terminal command:

man mount

will get you help

To umount:
sudo umount /server_name/share_name

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

As additional info:
The commands i typed are working fine on my local network...

Hope this helps

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Then if you want this remote share are auto-mounted when the Ubuntu pc start please add them to the
/etc/fstab directory

Thank you

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

Then if you want this remote share are auto-mounted when the Ubuntu pc start please add them to the
/etc/fstab
file

Using terminal, edit and add a mount row at the end of file, type:

sudo gedit /etc/fstab

Reboot

Thank you

Can you help with this problem?

Provide an answer of your own, or ask mwhager for more information if necessary.

To post a message you must log in.