chroot

CakePHP 2.0 : Database connection “Mysql” is missing, or could not be created

丶灬走出姿态 提交于 2019-12-22 18:52:47
问题 following the installation of CakePHP 2.0 (modified, I said that I get the same problem on a clean install of cakephp 2.0) I found myself facing an error I have not been able to solve. configuration: server : debian weezy 7 user : test structure : /wwwjail/siteroot/test/htdocs/[app/...] nginx configuration cat /etc/nginx/sites-available/test server { listen IP:80 default; server_name domain.fr; access_log /var/log/nginx/test.access.log; error_log /var/log/nginx/test.error.log; autoindex off;

debootstrap inside a docker container

て烟熏妆下的殇ゞ 提交于 2019-12-20 10:45:09
问题 Here's my problem: I want to build a chroot environment inside a docker container. The problem is that debootstrap cannot run, because it cannot mount proc in the chroot: W: Failure trying to run: chroot /var/chroot mount -t proc proc /proc (in the log the problem turns out to be: mount: permission denied ) If I run --privileged the container, it (of course) works... I'd really really really like to debootstrap the chroot in the Dockerfile (much much cleaner). Is there a way I can get it to

Detecting a chroot jail from within

吃可爱长大的小学妹 提交于 2019-12-18 10:36:08
问题 How can one detect being in a chroot jail without root privileges? Assume a standard BSD or Linux system. The best I came up with was to look at the inode value for "/" and to consider whether it is reasonably low, but I would like a more accurate method for detection. [edit 20080916 142430 EST] Simply looking around the filesystem isn't sufficient, as it's not difficult to duplicate things like /boot and /dev to fool the jailed user. [edit 20080916 142950 EST] For Linux systems, checking for

fork/chroot equivalent for Windows server application

心不动则不痛 提交于 2019-12-18 06:43:30
问题 I have written a small custom web server application in C running on Linux. When the application receives a request it calls fork() and handles the request in a separate process, which is chrooted into a specific directory containing the files I want to make available. I want to port the application to Windows, but neither fork() nor chroot() are available on this platform, and there don't seem to be any direct equivalents. Can you point me to a simple (and preferably well written) example of

What system files need to be in a jailed environment for php-fpm to function properly on ubuntu?

好久不见. 提交于 2019-12-14 03:57:03
问题 I'm using php5-fpm on ubuntu 12.04, and have separate pools and chroot locations for each domain hosted with nginx. However, I know that some system files need to be directly in the jail, but which ones do I need? I know that dns resolution isn't working currently, and I have read a few articles that say I need to copy some of the system core files into the directory, but they never really go into details of which ones I actually need to copy into there. I know there is something for dns,

chroot alternative

僤鯓⒐⒋嵵緔 提交于 2019-12-12 20:26:19
问题 I'm working on a webapp (running on an Ubuntu server) that will allow the user to run Octave code (basically Matlab). However, I only want them to be able to read or modify folders in their designated home folder. I know chroot is one way of doing this, but it's insecure and you need root privileges to chroot (which ideally the app won't need). Also, I could read the user's code before running and throw an error if they try to write to a file, but for that I'd need to think of EVERY way the

Udev rule is not being applied

馋奶兔 提交于 2019-12-12 05:17:05
问题 I am running a Linux chroot environment on an Android device and I am attempting to communicate with an Atmel atmega2560 based (Arduino Mega derived) microcontroller. Doing "ls -ld /dev/ttyACM0" shows the following permissions for the modem: crw------- 1 root root 166, 0 Feb 11 22:28 /dev/ttyACM0 "lsusb" tells me: Bus 003 Devices: ID 03eb:204b Atmel Corp. LUFA USB to Serial Adpater Project "udevadm info --attribute-walk --name=ttyACM0" says: Udevadm info starts with the device specified by

Create a Chroot Jail and copy all system files into jail

こ雲淡風輕ζ 提交于 2019-12-11 10:16:43
问题 I am creating chroot jail in linux , but i do not have access to any system file like ls/cd/gcc/g++. What are the necessary libs/bin/systme files i need to copy to my chroot jail ? 回答1: Executables like ls/cd/gcc/g++, they depend on shared library (unless you didn't build them to be statically). So, what you need to do is copy all those shared library dependencies to appropriate location into your chroot jail, also you need to find what are those shared dependencies are. To find out you need

Call chroot in PHP

心已入冬 提交于 2019-12-11 10:07:14
问题 For security reasons, some applications are isolated in a chroot environment. I need to call this applications through a PHP script. Something like that : exec('chroot /path/to/chroot command') I need to be root for using chroot . There is a chroot() in the PHP manual but this function also requires root privileges. So, how to use chroot ed commands in PHP? 回答1: chroot can only be called by privileged users. Otherwise, normal users could trick setuid applications such as passwd or sudo into

Defining ranges in bash for loops didn't work

最后都变了- 提交于 2019-12-11 06:08:51
问题 I have the following for loop in bash that creates loop devices in a chrooted directory. for var in 0 1 2 3 .. 7 do MAKEDEV -d ${CHROOT}/dev -x loop$var done This didn't work for me as after it creates loop3 it takes .. literally and tries to create loop.. and fails. However according to this tutorial it should have worked. I got it to work by doing the following: for (( var=0; var<=7; var++ )) do MAKEDEV -d ${CHROOT}/dev -x loop$var done I still want to know why the for loop I tried first