Ubuntu Servers :: Change Tomcat6 Root Directory In 9.10?
Jan 6, 2010
I have newly installed Ubuntu server 9.10 in my server machine.And it has tomcat6 in itself.My friend have built a Java software in Fedora ,and he wants to move it to the new server.But problem is the directory structure is different between two systems.He has to either change his directory setting in his software or change the default tomcat6 ROOT directory. But I have not find any configuration file can do this job(change the tomcat default ROOT directory ).
I'm trying to do a standard mod_jk setup--get apache to forward requests to Tomcat. I must admit that I'm not so familiar with the details of mod_jk, but I got this working before when I had used tomcat 6 directly from apache's website, but now that I've switched to the version in Ubuntu's repositories I can't get it working.
The log for mod_jk says:
Code: [Mon Mar 15 23:59:41 2010] [5575:3004840816] [error] ajp_send_request::jk_ajp_common.c (1359): (ajp13_worker) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=111) [Mon Mar 15 23:59:41 2010] [5575:3004840816] [error]
I've installed Sun Java, tomcat6 and tomcat6-admin on 10.04 server 64-bit. By default, tomcat is configured to run as the tomcat6 user. Everything runs just fine on tcp/8080 as initially configured. Modifying the connector port in /etc/tomcat6/server.xml to anything below 1024 (e.g. port 80) results in:
This all begs the question... do you *really* have to run tomcat as root to bind to a well-known port? I.e. is there really no way for tomcat to start as root, bind to a privileged port and then drop privs?
I've been using Ubuntu for over 5 years. This time I decided to upgrade UNR to the latest 10.10. I am now running it from USB to try it before installing. Excuse my ignorance, but whatever happened to the Terminal? I cannot find it anywhere! I think this release is not going in the right direction if one of the most important tools in Ubuntu is hidden from an average user.
Also, how do I change to the root directory in the files and folders? or at least to the higher directory structure.I won't be installing UNR 10.10 unless I figure out these BASIC things.
For a user on a Linux host, I need to make everything inaccessible besides his home directory. I have heard that this is usually done by changing the root directory for the user (and setting it to the user's home directory), however I couldn't find the way to do it.
I thought about the chroot command, but it seems it just runs the specified command, considering the specified directory as the root directory. So it seems chroot is not what i need. So my question is: what is the command which changes the user's root directory?
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
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
I also ran a whereis for bash and it also is there
In my website, I'm putting shared files in a "/global" folder. Both "styles.css" and "library.php" are in this global folder. HTML code seems to be working ok - the following bit works great to pick up a style sheet:
Code: <link rel="stylesheet" type="text/css" href="/global/styles.css" /> However PHP does not seem to understand my root directory. Using the following does not work: Code: include_once("/global/library.php");
I receive a "failed to open stream: No such file or directory" error.Spelling out the entire full path works, like so:
But this type of code is no good as I may change servers in the future. I have my "DocumentRoot" set correctly in my sites-available file. It seems as if PHP is ignoring it. Is there a config file someplace (htaccess? Local php.ini?) where I should update my root directory for this site only? Or am I following bad form and there's a better way to do this? Relative paths don't seem like the answer here though...
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.
It works without any issue ....Home directory changes to /jail/don when I ssh to the system as user don. ie: #ssh email@example.com
Then I added a chroot command to this 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 ?
I'm running Ubuntu 9.10 with Kvm. I've used a howto to configure my network. Seems to work fine, I've installed the Virtual Machine manager, when I go to create my Virtual Machine, I see the the image is automatically created in /var/lib/libvirt/images. I have a totally separate path for my images. How to I configure a different image directory
I just installed LAMP on ubuntu 10.04using this method:ow i want to change the directory where my websites are; default is "/var/www" right. I have a partition using NTSF file system where i have a folder with all my websites. Can i configure LAMP to use this folder?
I would like to change the permissions for a directory and all files inside the directory how do I do this? The website is located only on my local network so I am not worried about security. Also what would be the optimal permissions for running wordpress.
I use dual boot with windos 7. i use xampp in win7. want to use lampp for ubuntu 10.04. i want to use one local server directoy for both . i successfuly changed htdocs location in lampp. but could not change mysql data directory location.
I no longer have access to my root desktop. On a session I attempted to change the root username but i apparently assigned it a wrong directory that does not exist. When I rebooted with my new root username, i was instead recognised as a simple user (no root privileges). I tried the console to change to "old" root but root password is not accepted and there is no way to access to sudoer files. it seems that inserting a new username requires root privileges and i am back to square one. Simply logging with old root username and password after restart gives me a blank screen with nothing on it and cannot even reboot.
When I try to login as a user, I get the dreaded "500 OOPS: cannot change directory:". Almost every posting I can find related to this problem was due to SELinux being enabled. My SELinux is operating in permissive mode. So why can't it open the home directory when I log in as the tarheelnk user?
I run ProFTPd with TLS authentication on my Debian Lenny server. My problem is that despite of the fact that my users connect chrooted, one of my friends had root privileges after logging in form a Macintosh and could browse the root directory, too.
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.
Accidentally I changed the ownership of all the directories under / to my own instead of root:root. Now I am unable to use sudo and many bad things are happening. Is there a way to revert the changes or change the permissions again to root:root or make sudo work ?
I want to update all the machines in the network from a central repository which is on my master server and whose archive directory is shared through samba.I searched in the man page of sources.list and found that there is an option for this but can't able to implement this. Can anybody kindly tell me the way to do the same.
Now I know that in order to change the colors in your terminal you have to play around with ~/.bashrc But the effects don't stay in place after a change-root is taken affect. It just reverts to black. Is there any way I can change that too in .bashrc?
I'm very new to Linux, i'm running Ubuntu and i'm trying to install a program. In the instructions it says "Check that you ARE NOT root, never run similar tools as root! just change file permissions". How do i check if i'm root or what am I supposed to do here?