Programming :: Obtaining Access To File In Chroot Environment From Usual Root?

Aug 1, 2011

ccess to an iso file in chroot environment from my usual root (/) env..

Within the chroot environment I have an iso file placed... In my program I need to access this iso file and perform mount and other operations.. But I cant do this in the chroot environment as I have only basic commands here (ls,cp etc.. and no mount)

So how can I access this iso file from my program ? Is there something like a file-descriptor which I can associate with the file exit from the chroot env and access the file via this fd ?

View 6 Replies


ADVERTISEMENT

Programming :: Shell Script - Entering The Chroot Environment ?

Jul 19, 2010

My script is like this

Code:

How can i make the script do all those command using the script?

View 1 Replies View Related

Debian Configuration :: Man-db In Chroot Ssh Environment

Aug 26, 2015

I've been bashing around this for a couple of days, and could not find answer by using google. My debian 8.1.0 jessie runs perfectly fine. To perform SSH chroot jail, I issued an apt-get install makejail.

The ssh chroot environment runs great. I used makejail configuration scripts. The man pages are perfectly available from TTY login. Yet from a SSH session (chroot jailed) the man pages could not be found.

My MANPATH environment variable points at /usr/share/man

Running "mandb -c" from a SSH session as root tells:

0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.

simply copying the contents of the /usr/share/man to /jail/usr/share/man
and running the "mandb -c" command gives lots of "dangling symlink" errors.

Perhaps the /jail directory need some dependent files, or change file permissions somewhere but I just couldn' t figure that out.

View 0 Replies View Related

OpenSUSE Install :: How To Set Up A Chroot Environment

Aug 25, 2011

I`m running openSUSE Tumbleweed so the first question is: can i run ONLY another openSUSE OS inside the environment ? or can i run any distro i want ?

My second question is how do it set up the environment to act just like my normal OS, with both root and user rights on it? and of course can i run X ?

And finally third question: after googling a bit i did not found a tutorial for openSUSE but i have seen that is says that i have mount and/or bind certain things, how do i make the same thing under openSUSE for the respective chroot environment?

View 9 Replies View Related

Ubuntu :: How To Reboot A Chroot Environment

Nov 30, 2010

i created a chroot environment for maverick. while installing packages and ubuntu-desktop it says that i need to restart. when i pass the command " sudo shutdown -r 0" my whole system gets restarted. how can i restart that particular environment.

View 3 Replies View Related

Ubuntu :: No Names In Chroot Environment

Dec 4, 2010

I created a chroot environment for lucid. when i log in by executing this command "sudo chroot /var/chroot/lucid" it logged me in as a root user. i created a new account there, when i log in by that account i cant see anything written before $ sign. even if i change directory or anything else i cant see anything.

View 1 Replies View Related

General :: Ping Not Working In Chroot Environment

May 16, 2011

How can I use the ping command in a chroot environment?
$ ping 8.8.8.8
ping: icmp open socket: Operation not permitted
Currently I am using CentOs, but ideally there must be a solution that works in all chrooted environments.

View 2 Replies View Related

General :: Crete A 64bit Chroot Environment?

Jan 25, 2011

How to crete a 64bit chroot environment? Im not able to run Virtualbox.

View 2 Replies View Related

General :: Creating A Chroot Environment - Specifically With A Different Kernel ?

May 9, 2011

I have successfully installed a Ubuntu chroot (Maverick) on a running Linux appliance (an old Thecus N5200PRO box) which has been running various services for me quite happily.

When I attempted to add a webcam (for snapshotting) to this mix, I've come up against a problem. Since the chroot by default uses the kernel of the Thecus appliance, there appears to (understandably) be no support for the Logitech UVC webcam in the appliances' kernel; consequently inside or outside the chroot I can't access the UVC webcam.

I think I can get around this in a simple way if I can run a standard Ubuntu Maverick 32-bit kernel in the chroot.

Does anyone know how to chroot with alternative kernels, or quite simply, how to get a UVC webcam accessible on a Thecus N5200PRO?

Other details:

lsmod output
Output of uname -a:

Linux cube 2.6.23N5200 #1 PREEMPT Wed Jul 29 14:13:22 CST 2009 i686 GNU/Linux

lsusb -t output

View 2 Replies View Related

General :: Failed To Change Real Root To Fake Root Using Chroot?

Jun 28, 2011

I created a chroot jail in /SECURITY/Jail. But when I used the command 'sudo chroot /SECURITY/Jail' to enter the fake root, I got an error message likegroups: cannot find name for group ID 105groups: cannot find name for group ID 119.

View 1 Replies View Related

CentOS 5 Networking :: Bind9 In Chroot Environment Failed To Start?

Mar 19, 2011

system: centos 5.5 Kernel 2.6.18-194.el5 freshly installed. bind is configured in chroot environment out of the box. placed named.conf in /var/named/chroot/etc and my zone files in /var/named/chroot/var/named.

[Code]...

View 3 Replies View Related

Programming :: MHC Modula-2 - Cannot Access The Command Line Options And The Environment Variables

Jul 2, 2010

Anyone else using the Mill Hill & Canterbury (MHC) Modula-2 to Java compiler?

[URL]

I cannot access the command line options and the environment variables.

View 2 Replies View Related

Programming :: Preferred Method For Obtaining Harvard Style Referencing In LaTeX Document?

Mar 30, 2011

What is the preferred method for obtaining Harvard style referencing in a LaTeX document?

View 1 Replies View Related

Server :: Have SSH Chroot Access Mounted Drive

Aug 22, 2010

I have a chrooted account setup for my ssh server. However, I am trying to allow this user read only access to access on a mounted hard-drive and more specifically a specific folder from that mounted drive. I would also like to have this drive be mounted for me in my normal environment with write access.

View 2 Replies View Related

Ubuntu Installation :: Chroot: Cannot Change Root Directory To /mnt: Operation Not Permitted

Feb 20, 2010

I updated my lucid alpha testing (64 bit)install after which I am unable to boot into any of my Ubuntu installs(sda11 has a dedicated Burg partition and sda10 has the stable karmic (32 bit)install and sda9 has the testing lucid install) Now I am trying to recover (rewrite Burg or at least grub2 on the MBR) my installs

This is what happens
custom@custom:~$ sudo mount /dev/sda10 /mnt
custom@custom:~$ sudo mount -o bind /dev /mnt/dev
custom@custom:~$ chroot/mnt

[code]....

i tried a slightly different code with little success

custom@custom:~$ sudo mount /dev/sda10 /mnt
mount: /dev/sda10 already mounted or /mnt busy
mount: according to mtab, /dev/sda10 is already mounted on /mnt

[code]....

I also ran a whereis for bash and it also is there

View 9 Replies View Related

Security :: Deny Root Access To A Given File

Dec 7, 2010

I would like to know if it is possible to deny the access to a file for root? Would ACL's be a possibility? I have "googled" around but haven't found anything interesting (except SELinux). I should secure a password file to an important database.

View 6 Replies View Related

Red Hat / Fedora :: Chroot And MySQL And FTP Access Is Tunnelled Through SSH Using OpenSSH

Jan 19, 2010

The server I am working with is running CentOS 5.x. MySQL and FTP access is tunnelled through SSH using OpenSSH. Users are chrooted to their home directory as follows:

User: tristan
Home: /web/tristan/

Now, up to this point everything works fine (FTP access) except for MySQL tunnelling. The application I use for MySQL administration is Navicat. It allows me to access the remote SQL server as though it's local using a SSH tunnel. The problem is that I am unable to create a connection to the SQL server through tunnelling unless chroot is removed for the user. Once chroot is removed, I am able to connect to the SQL server just fine via tunnelling. However, ow when using SFTP, the user's "home" directory is now the root of the drive (which is what we don't want).

I wish I could give you more information about the configuration. Another user set this server up and unfortunately I will not be able to access the machine until a few days from now so my information is limited.

View 3 Replies View Related

General :: Chroot Error - Cannot Change Root Directory To /jail - Operation Not Permitted

Apr 18, 2011

I am trying to create a jailed shell for a user Don($UID '500') using my own method(I don't want to use any ready-made "jailkit"). The user don should get a home directory /jail/don instead of /home/don when he login via SSH (So that he will not able to see any other files/directories on the system)

This is what I have done.

Quote:

Code:

It works without any issue ....Home directory changes to /jail/don when I ssh to the system as user don. ie: #ssh don@192.168.0.66

Then I added a chroot command to this code.

Code:

Unfortunately , now I am getting an error message saying that "chroot: cannot change root directory to /jail: Operation not permitted" .. I am not sure how to rectify this error... Is my approach correct to get a jailed shell using /etc/profile file ?

View 8 Replies View Related

Ubuntu Servers :: Completely Chroot Enviornoment Where Every Single Service Is In Chroot Mode (bind,mysql, Postfix)?

Jul 12, 2011

recently we decided to make our own panel (like Plesk or cPanel) but for Ubuntu and it will be licenced under GPL (like any other professional sofware).want to make a panel not only that fits our needs but also the needs of other system administrators and domain owners. We researched other panels and found out that non of them has security/look/ease of use in one package. Bad codig is another problem found in other panels.I made a short overwiev of what I think we have to have in the beginning.I Security :1. Completely chroot enviornoment where every single service is in chroot mode (bind,mysql, postfix, .... )2. Easily managed IPtables trough web-based interface. 3. Coding rules has to be strict.

II Software selection :
1. MTA - Postfix
2. POP - dovecot

[code]....

View 7 Replies View Related

Programming :: File Access Alert \ Only Gives The Processes Accessing The File At That Particular Moment?

Jul 11, 2011

I am trying to check what all processes are accessing a particular file (a UDP socket in my case) on a filesystem.I am using 'fuser' for that.But, it seems, it only gives the processes accessing the file at that particular moment.Is there any way to continuously run 'fuser' (or some other command) which will give all processes accessing the file during its run?OR is it possible to generate a filesystem alert when a particular process accesses the file?

View 1 Replies View Related

General :: Restrict File Access To The Root User Of One Particular Host?

Aug 12, 2010

If there is a general NFS share in the LAN and for example this share has three files - a, b, c is there any way to restrict file access to the root user of one particular host(falcon) in the same LAN environment while the normal users from the same host(falcon) should be able to access the NFS share & files a, b, c.

View 1 Replies View Related

General :: Root File System More Users With Different Access Before Mounting?

May 11, 2011

I need to customize linux kernel root file system for embedded linux system. During compile time, for root file system I am able to create different user/group ex: "gnumuzic/Muzic". But I want to give access to group "Muzic" to some folders like /dev/nexig during compile time.

View 1 Replies View Related

Security :: Call Access Out Side Chroot Jail Files From Apache?

Apr 2, 2010

I have one requirement i.e I want to call the java file from the php function using shell_exec command , i am using the chroot jail concept , if i using this command i am getting the empty file because java environment is outside the chroot jail,so how to access the the files those are out side the chroot jail.

View 3 Replies View Related

Programming :: Bash Script To Chroot?

Aug 12, 2010

I just started to learn Bash. I need to work with what i know. Please keep that in mind.That said, here is my "problem":I often need to chroot to a Debian install from a Live-CD.So i need to:

mount the device of the OS
mount /sys /proc and /dev on the mounted device.
chroot

[code]....

View 10 Replies View Related

OpenSUSE Install :: Copy A File Into Root Folder - Setting The Access Permissions?

Jun 23, 2010

I want to copy a file into my Root folder but I cant.what should I do?

View 2 Replies View Related

Programming :: C File Functions Crash Unless Root

Jun 24, 2011

I've encountered a problem when running a simple bit of code, I'm using c to read write data to a binary file. It works fine when I run as root. However when I run as a user it produces the file, however when I try to open / write after it's produced it caused a seg fault. Is there any reason file functions ( fopen etc ) would work for root and not a user and is there a way to fix this?

View 14 Replies View Related

Ubuntu Security :: Access To A Virtual File System For The Thermocrom Without Needing To Launch Owfs As Root?

Feb 12, 2011

I have been trying to use my DS2490 USB to serial device with a Maxim .DG1921G thermocron with owfs. It is supposed to give me access to a virtual file system for the thermocrom without needing to launch owfs as root.

Code:
/var/log/messages gives:
Feb 8 16:22:45 norman-HP-G56-Notebook-PC kernel: [ 236.140141] usb 5-1: new full speed USB device using ohci_hcd and address 2[code]....

but if ds2490 module is loaded it works when run sudo.It seems from this that it is a lack of permissions to USB but I have tried all the methods on at http://owfs.org/index.php?page=udev etc. to overcome this and a few others but none work.I am running Ubuntu 10.10 kernel 2.6.35-22-generic #33-Ubuntu SMP

View 1 Replies View Related

Ubuntu :: Possible To Instead Of Using Desktop Folder Plasmoid / Usual Desktop Act As File Manager?

Nov 12, 2010

1. Is it possible to instead of using the Desktop Folder plasmoid, have a usual Desktop act as a file manager?
2. What is Akondi? There are tons of processes which have Akonadi in their name, and it seems to be using up lots of memory.Can I disable these somehow, or is it safe to do so?
3. Any general tips on how to reduce the amount ram that is used on startup? I am using somewhere around 750MB on startup, which is about double the amount Gnome uses. After a few hours of use, Xorg uses close to 1GB of memory.
4. Whenever I get a notification, they don't delete themselves, so when I click on the (i), I see tons of notifications. Is there a way to get them to delete themselves after they have been shown?

View 1 Replies View Related

Programming :: Log Access File Program?

Nov 11, 2010

i want to make a program to write the result of access to a file ,i mean for example a user wants to (open,delete,edit)a file but if he has no access to this file ,something write to a log file.so after that i can check which user got access denied by accessing to which file.or if any tools available that can do this?or if there is any built in log access file that record the permission denied to files?

View 4 Replies View Related

Ubuntu :: Chroot: Failed To Run Command `apt-get': No Such File Or Directory

Aug 8, 2011

Recently did a clean install (instead of upgrade) of 11.04 from 10.10 and this error bugged me for the first time.

ubuntu@ubuntu:~$ sudo apt-get install grub-pc
Reading package lists... Done
Building dependency tree

[code]....

followed this one too to the letter: ubuntu@ubuntu:~$ sudo chroot /mnt/clean/sda1 apt-get install -y grub-pc chroot: failed to run command `apt-get': No such file or directory tried this one too:

ubuntu@ubuntu:~$ sudo grub-install /dev/sda1/usr/sbin/grub-probe: error: cannot stat `aufs'.and this too which got me a bash something:

ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo mount -o bind /sys /mnt/sys

[code]...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved