Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: XBMC local access to SFTP chroot?

  1. #1
    Join Date
    May 2006
    Beans
    86
    Distro
    Ubuntu 12.04 Precise Pangolin

    XBMC local access to SFTP chroot?

    Hi, I've set up SFTP for transferring files and installed XBMC.
    Attached TV/monitor to the machine, XBMC runs fine.
    Can send files over by SFTP as well, cool!

    How should I give the XBMC logged in user access to the local SFTP chroot folder?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: XBMC local access to SFTP chroot?

    I'm confused. Why not just remote mount the place where the files are stored with either CIFS, Samba or NFS? No need to transfer the files at all if they are on the same LAN.

    If you need to transfer the files ... want a local copy for the library, why not transfer them into the final directory and let XBMC know about it as a Source? XBMC just needs read-access to those files, so that's an easy chmod -R command. I'm sure the GUI has a way to do it too. Just change the permissions.

    Is there a reason to use a chroot folder? Normally that is only done when files are made available on the interent from dangerous services like DAV, FTP, or for other non-file services known to be constantly cracked over the years like BIND or sendmail.

  3. #3
    Join Date
    May 2006
    Beans
    86
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: XBMC local access to SFTP chroot?

    Quote Originally Posted by TheFu View Post
    I'm confused. Why not just remote mount the place where the files are stored with either CIFS, Samba or NFS? No need to transfer the files at all if they are on the same LAN.

    If you need to transfer the files ... want a local copy for the library, why not transfer them into the final directory and let XBMC know about it as a Source? XBMC just needs read-access to those files, so that's an easy chmod -R command. I'm sure the GUI has a way to do it too. Just change the permissions.

    Is there a reason to use a chroot folder? Normally that is only done when files are made available on the interent from dangerous services like DAV, FTP, or for other non-file services known to be constantly cracked over the years like BIND or sendmail.
    Thanks for the response!
    SFTP is for remote use.
    Hadn't thought about mounting it separately yet, thanks!

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: XBMC local access to SFTP chroot?

    Quote Originally Posted by Zaggy View Post
    Thanks for the response!
    SFTP is for remote use.
    Hadn't thought about mounting it separately yet, thanks!
    So you were able to setup a chroot environment AND get sftp working inside it, but not able to run chmod? That doesn't sound right.

    Are you certain you setup chroot?

    I'm not saying this isn't possible, but that it seems really odd to be able to do the complex chroot work and not know about chmod.

    If the files are coming over the internet, then you shouldn't try mounting them. The streaming performance won't work for any video formats.

    Another option is to use a softlink to connect those files to someplace under the XMBC known "TV" and "Movie" locations.

  5. #5
    Join Date
    May 2006
    Beans
    86
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: XBMC local access to SFTP chroot?

    Quote Originally Posted by TheFu View Post
    So you were able to setup a chroot environment AND get sftp working inside it, but not able to run chmod? That doesn't sound right.

    Are you certain you setup chroot?

    I'm not saying this isn't possible, but that it seems really odd to be able to do the complex chroot work and not know about chmod.

    If the files are coming over the internet, then you shouldn't try mounting them. The streaming performance won't work for any video formats.

    Another option is to use a softlink to connect those files to someplace under the XMBC known "TV" and "Movie" locations.

    Not a complex chroot but using the sftp chroot functionality in sshd:
    Match group sftponly
    ChrootDirectory /storage/netdrive
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp

    This in combination with eldos netdrive works rather well.
    I guess I could have it XBMC connect over ssh via a local mount.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: XBMC local access to SFTP chroot?

    I didn’t know that ssh had a built-in chroot - very cool. Thanks!

    So the netdrive is a NAS and XBMC is the sftp server that drops files on the NAS. Very cool. Just setup another mount using CIFS, samba or NFS to the NAS storage. Don't bother with sshfs, it is too slow. Any FUSE file system will probably be too slow.

  7. #7
    Join Date
    May 2006
    Beans
    86
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: XBMC local access to SFTP chroot?

    Quote Originally Posted by TheFu View Post
    I didn’t know that ssh had a built-in chroot - very cool. Thanks!

    So the netdrive is a NAS and XBMC is the sftp server that drops files on the NAS. Very cool. Just setup another mount using CIFS, samba or NFS to the NAS storage. Don't bother with sshfs, it is too slow. Any FUSE file system will probably be too slow.
    Actually it's all on the same box.
    I'm new to this so please let me know if it's setup in a silly way.
    os on ssd, raid 5 mounted to /storage
    /storage/netdrive is the chroot

    Getting permission denieds when attempting to remote mount

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: XBMC local access to SFTP chroot?

    Output from df -k please. Only need the /dev/ stuff, not the virtual file systems.

  9. #9
    Join Date
    May 2006
    Beans
    86
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: XBMC local access to SFTP chroot?

    Quote Originally Posted by TheFu View Post
    Output from df -k please. Only need the /dev/ stuff, not the virtual file systems.
    Code:
    df -kh
    df: `/var/lib/lightdm/.gvfs': Permission denied
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/md1        103G   89G  8.7G  92% /
    udev            3.8G  4.0K  3.8G   1% /dev
    tmpfs           1.6G  1.3M  1.6G   1% /run
    none            5.0M     0  5.0M   0% /run/lock
    none            3.8G  684K  3.8G   1% /run/shm
    /dev/md2        5.5T  120G  5.3T   3% /storage

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: XBMC local access to SFTP chroot?

    So under /storage/netdrive you have TV/, Movie/, Music/ directories?
    If you trust the people with sftp access, then I'd just use those directly from XBMC. You don't need to mount them, since /storage is already mounted to the computer. Just point XMBC sources to the specific TV, Movie, Music subdirs.

    http://blog.jdpfu.com/2011/02/21/xbmc-tips explains more about the needed directory setup. I'm sure there are lots of other articles about that elsewhere. Don't fight the directory structure that XBMC likes.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •