SFT acces to remote storage for video folder

Hi everybody

Peertube is installed on a VPS
I want to have the videos on my NAS server.

I mounted a folder on my NAS server for the videos.
SFTP acces between VPS and NAS server is working.
Folder on the VPS is mouned.
Peertube user has the right on the folder.

In the logs a get following error message :

« stack »: « Error: EPERM: operation not permitted, copyfile ‹ /home/yunohost.app/peertube/storage/tmp/video.mp4 › -> ‹ /home/yunohost.app/peertube/storage/video2/video.mp4 › »,
Dec 31 12:35:34 Server Adress peertube[18729]: « message »: « EPERM: operation not permitted, copyfile ‹ /home/yunohost.app/peertube/storage/tmp/video.mp4 › -> ‹ /home/yunohost.app/peertube/storage/video2/video.mp4 › »,
Dec 31 12:35:34 Server Adress peertube[18729]: « errno »: -1,
Dec 31 12:35:34 Server Adress peertube[18729]: « code »: « EPERM »,
Dec 31 12:35:34 Server Adress peertube[18729]: « syscall »: « copyfile »,
Dec 31 12:35:34 Server Adress peertube[18729]: « path »: « /home/yunohost.app/peertube/storage/tmp/video.mp4 »,
Dec 31 12:35:34 Server Adress peertube[18729]: « dest »: « /home/yunohost.app/peertube/storage/video2/video.mp4 »

Thanks for the Help

Hi,

As the returned error EPERM tells, this is a permission issues.

  1. Did you check if the SFTP folder is writable ?
  2. Didn’t you mount in readonly on the VPS ?
  3. Does the mount point options use a user that did not have writing rights ?
  4. Has the user which peertube runs with, the write access right on the mount point ?

I check the rights in both folder of the VPS and on the NAS.
Here are the rights of the folder on the VPS:
drwxrwxrwx 1 peertube peertube 4096 Dec 31 16:09 /home/yunohost.app/peertube/storage/video2/

On the NAS the user that is used to get acces to the folder has also the rights

How do you mount the SFTP on your VPS ?

This is how I mounted the folder:

sshfs -o allow_other,default_permissions -p 29 sebik@domaineoftheNASServer.net:/video/storage/videos /home/yunohost.app/peertube/storage/video2/

sebik is the user on the NASServer. This user has the rights wrx (write read and execute)

OK,

look at the solution of this: https://unix.stackexchange.com/questions/222944/mount-with-sshfs-and-write-file-permissions