Page 1 of 1

Referring to a Linux share

Posted: Thu Jan 23, 2020 1:00 am
by zy682517
Hi,

This is a Linux posting not a PHP/Web Server posting.

I've discovered, quite by accident, that I refer to a QNAP shared drive as /share/Multimedia or /share/Public or whatever when using PHP on my NAS web server

Here is the command line used when mounting a remote share on a Linux box (QNAP NAS) :- mount -t cifs //"ip-of-remote-nas"/"share-on-remote-nas" -o username="username for remote NAS",password="paswd for remoteNAS" /share/remoteNAS

Everything in ""'s needs to be entered

My question what is the share name when this is done???

/remoteNAS perhaps

Robert, Edinburgh

Re: Referring to a Linux share

Posted: Thu Jan 23, 2020 6:57 am
by OneCD
zy682517 wrote:
Thu Jan 23, 2020 1:00 am
Here is the command line used when mounting a remote share on a Linux box (QNAP NAS) :- mount -t cifs //"ip-of-remote-nas"/"share-on-remote-nas" -o username="username for remote NAS",password="paswd for remoteNAS" /share/remoteNAS
...
My question what is the share name when this is done???
After mounting a remote share locally, you don't need to refer to it by a share-name, you only refer to it by the mount-point in your local filesystem. So, using your example, the mount-point in your local filesystem will be [/share/remoteNAS].

Re: Referring to a Linux share

Posted: Thu Jan 23, 2020 5:24 pm
by zy682517
Tried the command line and it doesn't work!

I had got this from another posting so back to the starting line again.

Re: Referring to a Linux share

Posted: Thu Jan 23, 2020 5:45 pm
by OneCD
I don’t know why you’re now posting that the command line doesn’t work. I didn’t ask you to try it. I only answered your question regarding the mounted share-name.

Maybe you should rethink and rephrase your question so the community will have some idea what the ** you’re asking about? :S

Re: Referring to a Linux share

Posted: Sat Jan 25, 2020 7:18 pm
by zy682517
OK after your reprimand here it is in plain English.

I have successfully written a PHP application that runs on a TS-251+ and can access folders on this NAS1 using the following sample path /share/Multimedia/MyFilms/V/video.mp4

I want to mount a share name on NAS1 that refers to a folder on my second NAS2. The Forum suggested the command line I posted and it simply doesn't work. This was supposed to mount a share on my NAS1.

So, I would appreciate a suggestion as to how I mount a share on NAS1 that refers to a folder on NAS2. Both are TS-251+. If I can get it to work I will share the working code on the PHP forum so all QNAP NAS owners interested in PHP can benefit.

Re: Referring to a Linux share

Posted: Mon Feb 10, 2020 12:57 pm
by torch1
Try:
mount -t cifs -o username=user,password=pass //NAS2/share /mnt/mountpoint
or
mount -t nfs NAS2:/share /mnt/mountpoint

Note that the "/mnt/mountpoint" must already exist on NAS1 (which you can create by "mkdir /mnt/mountpoint").