couchpotato.core.softchroot module¶
-
class
couchpotato.core.softchroot.
SoftChroot
[source]¶ Soft Chroot module
Provides chroot feature for interation with Web-UI. Since it is not real chroot, so the name is SOFT CHROOT. The module prevents access to entire file-system, allowing access only to subdirs of SOFT-CHROOT directory.
-
get_chroot
()[source]¶ Returns root in chrooted environment
- Raises:
- RuntimeError: when SoftChroot is not initialized OR enabled
-
initialize
(chdir)[source]¶ initialize module, by setting soft-chroot-directory
Sets soft-chroot directory and ‘enabled’-flag
- Args:
- self (SoftChroot) : self chdir (string) : absolute path to soft-chroot
- Raises:
- SoftChrootInitError: when chdir doesn’t exist
-