Jump to content


Photo

FTP server mount startup.


  • Please log in to reply
32 replies to this topic

#1 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 7 April 2021 - 18:02

Hi!
Please help.
 
I have an ftp server that I would like to mount to a directory at startup.
I use curlftpfs, it works on another STB.
I typed the command in the fstab file, but it doesn't mount it at startup.
 
After booting from the terminal, issue the "mount -a" command, then mount it.
 
Why not mount it automatically at startup?
 
Can somebody help me?
Thanks.


Re: FTP server mount startup. #2 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 7 April 2021 - 18:10

Not supported by the udev mounter?


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #3 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 7 April 2021 - 18:15

I don't know what is that.
I use openpli 8.0 on VU+ DUO2 STB.



Re: FTP server mount startup. #4 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 7 April 2021 - 19:43

It would also be a solution for me to be able to issue the "mount - a" command automatically at startup.
Isn't that also possible?


Re: FTP server mount startup. #5 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 7 April 2021 - 22:51

You can create "/etc//init.d/rcS.local", make sure it is executable, and put the command in there.

 

It could also be that it doesn't mount because at the time fstab is processed, there is no active network yet. In that case, create a script in "/etc/network/if-up.d/" instead, and it will run as soon as the network interface comes up.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #6 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 8 April 2021 - 06:58

I don't understand that.
I'm just a user.
 
I tried once.
I wrote the script, put it in the init.d directory, but got this far.
Failed to run.
 
Isn't there an easier solution?


Re: FTP server mount startup. #7 40H3X

  • Forum Moderator
    PLi® Contributor
  • 5,782 posts

+186
Excellent

Posted 8 April 2021 - 07:42

Why do you want to run a ftp server from OpenPLi?


Hardware: Vu+ Uno 4K SE - Vu+ Duo 4K  - Fuba 78 cm - Tripleblock LNB Quad 19.2/23.5/28.2 - DS918+
Software : OpenPLi - OSCam - Settings van Hans - Autotimer - EPGImport

---------------------------------------------------------------------------------------------------------------------------------------

Remember: Upvote with the rep_up.png button for any user/post you find to be helpful, informative, or deserving of recognition!

---------------------------------------------------------------------------------------------------------------------------------------

Many answers to your question can be found in our new and improved wiki

Note: I do not provide support via PM !.


Re: FTP server mount startup. #8 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 8 April 2021 - 12:36

I don't understand that.

I'm just a user.

 

If you don't know what you're doing, perhaps try to crawl before you try to run, and study first?

 

Why do you want to run a ftp server from OpenPLi?

 

(S)he doesn't want to run an FTP server, but mount an ftp server.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #9 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 9 April 2021 - 17:45

"If you don't know what you're doing, perhaps try to crawl before you try to run, and study first?"

I didn’t think this was a huge problem.

I would like to use, not programing.
Don’t even have to learn to service a car for anyone who just wants to drive.
 
It wouldn’t be necessary if I could solve it on the local network.
Unfortunately, neither openpli nor openatv can see windows shares.
The STB sees the windows computer on the local network (there are shared folders on it), but can't browse it even though I give it the username and password.
 
That's why I'm trying FTP.


Re: FTP server mount startup. #10 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 9 April 2021 - 18:03

The fact that you can't browse doesn't mean it doesn't work? Most users use a CIFS mount, without any problem. Ask the right questions to get the right answers.

 

And no, you don't need to learn to service a car, but you pay someone to do it for you...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #11 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 9 April 2021 - 18:22

There are images that handle CIFS shares well by default.
For example, openhdf, pure2.
After network browsing I enter my username and password and see the windows shares.
Openatv, openpli doesn't work and I don't know why.
If I manually configure the CIFS optional connection settings (rw, utf8, vers = 1.0 (or 2.0 or2.1)) it won't connect either.
 
If I specify the same connection settings as for the PURE2 system (which works), it won't be able to connect either.
So here the problem is with openpli (network management), not the user.
 
A cheap android tv box with KODI can handle ftp server by default ...


Re: FTP server mount startup. #12 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 10 April 2021 - 01:53

That happens when people rip take your code but don't bother to push changes back upstream, in order to take credits. Too bad, but that's how quite a few of those images work.

 

There is no need to enter any connection settings, OpenPLi will autodetect them, all you need to enter is ip address (or hostname, but not both!), mountpoint name (will be created in /media), share name,username and password.

 

It mounts immediately here, both shares of another box and of my Synology.

 

Network browsing only works if both SMBv1 and NetBIOS broadcasting is enabled on the server. These days, both are disabled by default, on most server platforms. The alternative is to use WSD, a discovery protocol over HTTP, but that is not implemented in the network browser (which is over 10 years old).

 

edit:

 

Also, most images use busybox mount to actually mount the share. It doesn't care if you enter options that are wrong or not supported. We use linux mount, which doesn't continue when incorrect options are detected. If you want to check why something doesn't mount, enter your mount, restart Enigma in debug mode, when restarted, restart again in standard mode, and check the debuglog in /home/root.

 

You'll see the generated mount command in there, plus any error messages.


Edited by WanWizard, 10 April 2021 - 02:01.

Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #13 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 10 April 2021 - 14:34

This is in the debuglog:
 
[AutoMount.py] self.automounts without active mounts {'nas': {'username': 'nas', 'sharedir': 'media/net', 'ip': '192.168.0.103', 'isMounted': False, 'host': '', 'active': 'False', 'password': '123456', 'sharename': 'nas', 'hdd_replacement': 'False', 'options': 'rw,utf8,vers=1.0', 'mounttype': 'cifs'}}
[AutoMount.py] UMOUNT-CMD-1 ---> umount -fl '/media/net/nas'
[Console] command: umount -fl '/media/net/nas'
[eConsoleAppContainer] Starting /bin/sh
[Console] finished: umount -fl '/media/net/nas'
[AutoMount.py] CheckMountPointFinished umount: can't unmount /media/net/nas: No such file or directory

[AutoMount.py] UMOUNT-CMD-3 ---> umount -fl '/media/net/nas'
umount: can't unmount /media/net/nas: No such file or directory
[AutoMount.py] Failed to create /media/net/nas Error: [Errno 13] Permission denied: '/media/net/nas'
[AutoMount.py] CheckMountPointFinished None None
[AutoMount.py] CheckMountPointFinished, verifying:  /media/net/nas
[AutoMount.py] CheckMountPointFinished, # of appContainers:  0
[AutoMount.py] CheckMountPointFinished, callback timer
 
It doesn't say anything to me...


Re: FTP server mount startup. #14 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 10 April 2021 - 14:49

Good news!:
 
I typed a terminal command (created the /mnt/ftp directory):
"mount -t cifs -o username = nas //192.168.0.103/D/ / mnt/ftp"
 
He asked for the password.
I typed and openpli connected the directory.
 
So that's how it works.
 
Now, to do is plug it in automatically at startup.
How to write this command to the fstab file?

And the important question:
Why doesn't this work through network settings?
Why does it only work from the command line?

edit:
After reboot automatic deleted the /mnt/ftp directory...
Whí?

Edited by Kenderice, 10 April 2021 - 14:54.


Re: FTP server mount startup. #15 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 10 April 2021 - 14:55

The error is clear:

[AutoMount.py] Failed to create /media/net/nas Error: [Errno 13] Permission denied: '/media/net/nas'

So it can't create the mountpoint for one reason or another.
 


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #16 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 10 April 2021 - 15:06

Thanks for your help.
I looked around the internet for how to write this into the fstab file.
Managed to do it.
Here's how I typed:
//192.168.0.103/D/ / usr/ftp cifs gid = users, file_mode = 0664, dir_mode = 0775, auto, username = nas, password = 123456 0 0
 
After startup I see the windows share in the /usr/ftp directory.
 
Thanks again.

Edited by Kenderice, 10 April 2021 - 15:07.


Re: FTP server mount startup. #17 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 10 April 2021 - 16:36

Why create a /usr/ftp? It's in flash memory, so it will be deleted on upgrades. And it's a mountpoint Enigma can't work with, as it expects its mountpoint in /media.

 

So what have you changed so that /media/net/nas can not be created? /media is volatile, it will be recreated on every boot...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #18 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 10 April 2021 - 21:27

Why create a /usr/ftp? It's in flash memory, so it will be deleted on upgrades. And it's a mountpoint Enigma can't work with, as it expects its mountpoint in /media.

 

So what have you changed so that /media/net/nas can not be created? /media is volatile, it will be recreated on every boot...

Because the / nas directory in the / media / net directory that I created with the mkdir command is always deleted on reboot.
After reboot, there is no / nas directory in the / media / net directory.
Therefore, the path specified in the fstab file cannot be mounted there.
However, the / usr / ftp directory is not deleted after a reboot.
That is why I chose this solution.
I tried several mount.
But it's good for me that way because it works.
Sorry my english ...


Re: FTP server mount startup. #19 WanWizard

  • PLi® Core member
  • 68,303 posts

+1,718
Excellent

Posted 10 April 2021 - 21:40

You don't need to create it yourself, it is automatically created when the automounter runs. Unless you create it yourself before the automounter runs, in which case the mount fails because it's mountpoint already exists.

 

I have a feeling you're doing all sorts you're not supposed to, which has broken it, and now you're trying to work around the thing you broke in the first place.

 

Believe me, if there was an issue mounting CIFS mounts, this forum would be red-hot with error reports...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: FTP server mount startup. #20 Kenderice

  • Member
  • 22 posts

0
Neutral

Posted 11 April 2021 - 07:24

"You don't need to create it yourself, it is automatically created when the automounter runs."
 

That is the problem, not created and therefore cannot mount there.
 
Interestingly, in a PURE2 system, this happens without error.
Also mount windows shares immediately and use curftpfs (in fstab) to mount the remote FTP server automatically.
However, Openpli is not. Only manual, in terminal can mount.
Openatv is the same.
So not the windows sharing is faulty.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users