Entries tagged as Linux
Related tags
Amazon Linux Centos IDMAPD NFS NFS Nobody NFS4 Redhat RPCIDMAPD bad interpreter Bash line endings vi Fedora Gnome LAMP RHEL VirtualBox Virtualization Xen XWindows Yum apache LampSig MySQL Null PHP PHPFreaks remi SQL Subversion SVN Tutorial Update virtualization Web Development yum Crackers RPM Website mysql php 64bit Blog Coop Intel T6500 Intel VT Serendipity Sony Vaio T6500 UML virtualbox WordpressCentos, Amazon Linux, NFS and the dreaded "nobody" problem Tue, Jan 31. 2012
I have been fighting a problem with mounting volumes from an NFS Server in AWS for a few days. With more pressing issues at hand, I had to try and google for solutions for an hour or so before bed, and nothing I was doing was having any effect. Curiously, an Ubuntu based machine that was mounting the drive using NFS3 was not having the same problem. Only the Amazon Linux servers that were using NFS4 were having the issue, and were showing all files and directories as being owned by nobody:nobody.
drwxr-xr-x 2 nobody nobody 22 Jan 9 19:58 installervc
drwxr-xr-x 2 nobody nobody 4.0K Jan 9 19:56 avatar
drwxr-xr-x 2 nobody nobody 4.0K Jan 9 19:56 accessories
I had previously insured that the user UID and group GID for the user that would be writing files (in my case "apache" was the same (with the same UID and GID) on the NFS server and the servers mounting the nfs volume.
As it turned out the problem was with the configuration (or lack thereof) of the rpcidmapd service. NFS4 relies on this service to map users between machines. The "idmapd" requires that the domain of both the client and server should match for the UID/GID mapping to work, and in my case it wasn't. Probably many people with proper DNS configuration don't hit this problem, but we did not have a proper DNS setup, as these machines are part of a growing cluster. Compounding the problem I had set the configuration files to have meaningless host names rather than a domain.
You can tweak this setup by editing the: /etc/idmapd.conf file, and find the "Domain" variable:
Domain = yourdomain.com
Set these to be the same for the server and all the clients.
The last problem was that I had to restart the idmapd process, which has an /etc/init.d control script named /etc/rpcidmapd
[root@web1 init.d]# ls -lath | grep rpcid
-rwxr-xr-x 1 root root 2.7K Jul 28 2011 rpcidmapd
Restart the process on both the nfs server and any nfs clients. If the source of your problem is the same as mine, your user & group mapping problems should be solved:
sudo /etc/inti.d/rpcidmapd restart
Finally!!!!
drwxr-xr-x 2 apache apache 22 Jan 9 19:58 installervc
drwxr-xr-x 2 apache apache 4.0K Jan 9 19:56 avatar
drwxr-xr-x 2 apache apache 4.0K Jan 9 19:56 accessories
drwxr-xr-x 2 nobody nobody 22 Jan 9 19:58 installervc
drwxr-xr-x 2 nobody nobody 4.0K Jan 9 19:56 avatar
drwxr-xr-x 2 nobody nobody 4.0K Jan 9 19:56 accessories
I had previously insured that the user UID and group GID for the user that would be writing files (in my case "apache" was the same (with the same UID and GID) on the NFS server and the servers mounting the nfs volume.
As it turned out the problem was with the configuration (or lack thereof) of the rpcidmapd service. NFS4 relies on this service to map users between machines. The "idmapd" requires that the domain of both the client and server should match for the UID/GID mapping to work, and in my case it wasn't. Probably many people with proper DNS configuration don't hit this problem, but we did not have a proper DNS setup, as these machines are part of a growing cluster. Compounding the problem I had set the configuration files to have meaningless host names rather than a domain.
You can tweak this setup by editing the: /etc/idmapd.conf file, and find the "Domain" variable:
Domain = yourdomain.com
Set these to be the same for the server and all the clients.
The last problem was that I had to restart the idmapd process, which has an /etc/init.d control script named /etc/rpcidmapd
[root@web1 init.d]# ls -lath | grep rpcid
-rwxr-xr-x 1 root root 2.7K Jul 28 2011 rpcidmapd
Restart the process on both the nfs server and any nfs clients. If the source of your problem is the same as mine, your user & group mapping problems should be solved:
sudo /etc/inti.d/rpcidmapd restart
Finally!!!!
drwxr-xr-x 2 apache apache 22 Jan 9 19:58 installervc
drwxr-xr-x 2 apache apache 4.0K Jan 9 19:56 avatar
drwxr-xr-x 2 apache apache 4.0K Jan 9 19:56 accessories
Defined tags for this entry: Amazon Linux, Centos, IDMAPD, Linux, NFS, NFS Nobody, NFS4, Redhat, RPCIDMAPD
Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox Thu, Jul 16. 2009
If you use a Windows based workstation or notebook computer virtualization offers a way for you to run a linux server environment using the same linux distribution and configuration you'll use in production. Virtualization allows you to explore clustering and network setups that can't be tested on your workstation alone and simplifies your development environment by keeping the LAMP environment contained inside a VM.
While VMWare offers these capabilities with their VMWare workstation product, Sun has created a free alternative called VirtualBox, with many of the same capabilities in VMWare workstation. VirtualBox runs on a variety of intel chip based operating systems including OS/X, Windows XP & Vista, Linux and Solaris, and supports the installation of many different "Guest" operating systems. In this article, I'll detail the installation and configuration of Centos. Centos is a great choice for a Linux server operating system, as it is widely used by hosting companies due to its Redhat Enterprise Linux (RHEL) core.
Our goals in this setup will be:
• Centos server running the LAMP stack
• XP can be used to develop code using the IDE of your choice.
• The XP Workstation can communicate with the linux server using standard tools: putty, winscp, firefox
• The setup works even when no other networking is available. When a network is available, no network reconfiguration is required.
• Use XP to setup private domain resolution so apache vhost configurations can be tested.
Let's get started.
While VMWare offers these capabilities with their VMWare workstation product, Sun has created a free alternative called VirtualBox, with many of the same capabilities in VMWare workstation. VirtualBox runs on a variety of intel chip based operating systems including OS/X, Windows XP & Vista, Linux and Solaris, and supports the installation of many different "Guest" operating systems. In this article, I'll detail the installation and configuration of Centos. Centos is a great choice for a Linux server operating system, as it is widely used by hosting companies due to its Redhat Enterprise Linux (RHEL) core.
Our goals in this setup will be:
• Centos server running the LAMP stack
• XP can be used to develop code using the IDE of your choice.
• The XP Workstation can communicate with the linux server using standard tools: putty, winscp, firefox
• The setup works even when no other networking is available. When a network is available, no network reconfiguration is required.
• Use XP to setup private domain resolution so apache vhost configurations can be tested.
Let's get started.
Continue reading "Run a Centos Lamp development server on XP, Vista or Win 7 using VirtualBox" »
Linux shell scripting: bad interpreter: No such file or directory Mon, Sep 15. 2008
This error pops up for a couple of reasons. At the top of the script there will probably be a line that looks like this:
This is telling Linux that this script should be interpreted using the /bin/sh program. So your first step is to verify that program exists. I tend to use:
This will typically come back with a response like this:
This is telling us that the path to the sh program is in fact /bin/sh, matching the path specified at the top of the script. Ok, so what gives? Well, it's possible that this script was made on an operating system that has line ending characters different than linux. This could have been on on a Mac or PC, or the file could have been converted when it was packaged. In this case, you get the relatively misleading bad interpreter: No such file or directory message, which is really trying to look for sh, although you don't get any indication of the fact.
So, how to fix? Read on.
#!/bin/sh
This is telling Linux that this script should be interpreted using the /bin/sh program. So your first step is to verify that program exists. I tend to use:
which sh
This will typically come back with a response like this:
/bin/sh
This is telling us that the path to the sh program is in fact /bin/sh, matching the path specified at the top of the script. Ok, so what gives? Well, it's possible that this script was made on an operating system that has line ending characters different than linux. This could have been on on a Mac or PC, or the file could have been converted when it was packaged. In this case, you get the relatively misleading bad interpreter: No such file or directory message, which is really trying to look for sh
So, how to fix? Read on.
Continue reading "Linux shell scripting: bad interpreter: No such file or directory" »
Xen 3.0 Fedora Core, RHEL, Centos 4.x How-to Tue, Jun 12. 2007
I gave a talk on the use of Xen for web developers at Lampsig. It took me a while to get my notes transcribed, but here at last they are. This prescription has been used by me to install Xen successfully on a Fedora core 4 box, Centos 4.3 and 4.4 boxes, and should probably work on RHEL, assuming you can figure out how to get the packages you need. I cover use of file backed file systems, and how to mount and edit them, as well as expanding a file based filesystem.
I have run gentoo and Centos guests I got from jailtime.org and have found them to be very stable. I even was able to use this on a 64 bit server, although I did have to build my own guest. Many people who have had trouble getting Xen to work reliably when using the packaged (rpm) versions of Xen may find this prescription fixes their problems.
Xen 3.0 Centos How-to
Install Xwindows and Gnome on Centos with Yum Sun, May 20. 2007
I recently had need to add XWindows to a Centos 4.x install that didn't have X or Gnome. I was doing this under VMware which added slightly to the degree of difficulty. As it turns out, using Yum makes this a very easy process, although you probably end up with some bloated packageware.
Pay close attention to the capitalization -- Yum is picky. "Gnome desktop environment" won't work, for example.
CODE:
# yum groupinstall "X Window System" "GNOME Desktop Environment"
Pay close attention to the capitalization -- Yum is picky. "Gnome desktop environment" won't work, for example.
Lampsig and SCALE Sat, Feb 12. 2005
I'm attending the Southern California Linux Convention this weekend, along with other members of Lampsig. Folks are rabid for information on LAMP as illustrated by this shot of the Lampsig booth. Defined tags for this entry: Linux
« previous page
(Page 1 of 2, totaling 7 entries)
next page »


