Server :: How To Get Apache Running In User Home Directory
Dec 10, 2010
I'm trying to get Apache to run in a user's home directory. I changed the conf file so that Apache runs under the user and group "kiosk" and changed the DocumentRoot and Directory from the default to "/home/kiosk". Then I set Apache to start at boot (chkconfig --level 235 httpd on) and rebooted. When I checked, httpd is running as kiosk like it should (ps aux | grep httpd). However, when I try wget localhost, I get a 403 response back. If as root I call "httpd -k stop" and then "httpd -k start", then everything works exactly as it should (curiously, if I try using "-k restart", it still doesn't work). After this, httpd still shows as running as kiosk and if I check before calling start, it shows no httpd processes running as expected.
This only happens when I use httpd to stop and then start the web server. If I try to restart using apachectl I still get a 403 error. As an interesting aside, after I've used httpd, if I try using "apachectl restart" I get a "(13)Permission denied: Error retrieving pid file run/httpd.pid" error. This is all on a freshly installed CentOS 5.5 server. Why I'm seeing this very different behaviour from what I thought were just equivalent ways of starting Apache? And then what I could do to get it to start up and run properly on boot? One last item to mention is this isn't a permissions problem. I set the permissions to 777 to both the home and kiosk directories (and 666 to the web files) just to be sure that's not the problem.
I am now using CentOS5 as the server providing Apache services. I have managed to setup the web page under /home/user1/public_html, now I wish to change the default web page of our server to /home/user1/public_html. i tried to modify httpd.conf, in which i changed the "/var/www/" to the above user directory, but didnot work. Please kindly suggest.
I recently started using SVN with Apache for my web development, although I find it really annoying that I have to issue two SVN commands (one local, one remote) to update my web site. I have been looking into SVN post-commit hooks to solve this problem. The only problem is that apache does not have permission to modify files in my user directory... So here is how everything is setup. I am running Slackware 13 full install. There have been no installations overriding any of the default installs.
I am using NIS and I want to replace this with 389 ds. I have installed 389 ds and configured it. I could create user account from 389-console. But it does not create user home directory. Do I have to create user account and user home directory in linux first?
I'm using Slackware 13.0 on my server and am going to be employing a file-sharing service for a client. I was able to enable a quota, but my problem now is keeping the user inside their home directory. I've searched around and found an old thread on here (from 2003) that gave me some ideas, but it still isn't working. Should I be running vsftpd standalone or leave it on the inetd? If I set the shell to /sbin/nologin or /bin/false, the user can't log in through FTP, even.
chroot_local_user=NO chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list from /etc/passwd:
1.User login/authentication via a single NIS server. 2. User home directory should also be on the Same NIS server. 3. If possible to setup a single shared home directory for all users.
OpenSuse version 11.2 There are twelve workstations from which users will login using the NIS authentication. I have succeeded in setting up NI server. However login fails as the home directory is not accessible.
Continuing with my assigned task of migrating the company's PCs to GNU/Linux (openSUSE as server for GNU/Linux clients) I managed to set up a DC with roaming profiles for the few remaining Windows users, user validation and login for the openSUSE boxes and a few network shares with different rights. I know there are no roaming profiles for GNU/Linux and I can live with that but I would like to specify wich users/groups would have their home directories saved locally (notebook users) and which will save them on the Samba server.
By default home directories are saved locally but somehow Samba creates a minimal home directory for each user under /home in the Samba server. How can I tell the client box to use that directory? and how can I set up the few notebook users to save it on their disks? Maybe using the options under Yast > Security... > Users and groups management > Users (LDAP Users filter) > and then select the user and use the "Manage Samba account parameters" plug-in for specifying the different paths cant achieve this.
I have a secondary disk which holds a /home directory structure from a previous install of Linux. I installed a new version on a new primary drive and mounted this secondary drive as the new /home. Problem is, even though the users are the same names and I can access the home directories for the users, I cannot login directly to their home directories, as I get the following error: -
Code:
login as: [me] [me]@[machine]'s password: Last login: Wed Jan 6 18:34:33 2010 from [machine] Could not chdir to home directory /home/[me]: Permission denied [[me]@[machine] /]$
Now, since the usernames are correct and the users are in the passwd file with the correct home directory paths, could it be user ID's that are different or something else? It's not as though I cannot access the home directories for the users, simply that I cannot log directly into them from a login prompt.
created a user but i forgot to change the home directory permission.so after user created when i go to the user and group mangement i cant see that permission filed related to the home permission directory.my purpose is to stop accessing other user to my home directory,how it can be possible??
I'm developing an application in which one user must run java software that I'm compiling as another user. I wanted to give user A permission to see the bin direcory of my workspace, which is in the home directory of user B. I was wondering how can this be done? I gave the bin direcotry full read/execute premissions, but since it's in my home directory user A can't navigate to it.
I know there are a few ways I could get around the problem but they arn't very elegant. I was wondering if there is a simple method for giving a user access to a specific directory without giving access to all the parent directories. I tried symbolic link but user A still can't access it, and a hard link to a directory isn't allowed in Linux. I don't feel like making a hard link to every single file in the bin directory, and I'm not sure that would work anyways, since every recompile overwrites them.
i have rhel 5.2 and i want to create user using useradd command without creating user home directory and not throwing any warning/error about not creating any home directory.i have tried useradd -u "$NEW_UID" -g <gid> -d "/home/$1" -M "$1"where $1 is user name and $NEW_UID is i am calculating.it throws error as useradd: cannot create directory /home/$1which i dont want to come , how to prevent this?
i'm new to linux and just installed Ubuntu and decided to play around with it. i just executed
Code: useradd test which supposedly creates a folder in the home directory '/home/test' but when i look in there i can't see it i also did a
Code: grep test /etc/passwd which returns: 'test:x:1001:1001::/home/test:/bin/sh' which i believe means it is meant to exist.
Addendum: I have also now noticed that when i log in and log back in i have the option to login as 'test' but it prompts me for a password which i did not set :s
Vanilla install of Karmic (64 bit) - would like to change the Apache doc root to point to /home/sam/www as it's my web development machine. (Default install is working fine) Created copy of 'default' to 'mylocal' in '/etc/apache2/sites-available'
Code: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/sam/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/sam/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ...
The permissions on the folder in my home dir: Code: sam@rocket:~$ ls -la ww* total 16 drwxrwxrwx 2 sam sam 4096 2010-01-09 22:26 . drwx------ 35 sam sam 12288 2010-01-09 22:11 .. -rwxrwxrwx 1 sam sam 100 2010-01-09 22:27 index.html sam@rocket:~$ pwd /home/sam sam@rocket:~$ The sites enabled set up:
Code: root@rocket:/etc/apache2# ls -la sites-enabled/ total 8 drwxr-xr-x 2 root root 4096 2010-01-09 22:24 . drwxr-xr-x 7 root root 4096 2009-12-20 00:22 .. lrwxrwxrwx 1 root root 26 2010-01-09 22:24 mylocal -> ../sites-available/mylocal But I still get: "Forbidden You don't have permission to access / on this server".
When I run the ps -efH command to list out all the process, I can see Apache running as root and seems to have sub-processes running as www-data. Here's the excerpt:
I'm configuring Apache for the first time on this box (8.04 LTS) and Apache2 for the first time ever. "Out of the box" it runs fine and I get the "It Works" page okay. But I'd like to use the virtual site feature to direct Apache to a folder in my user space, and I keep getting errors.
When I point a browser at localhost, the 404 message is "The requested URL / was not found on this server." and the /var/log/apache2/error.log ends with "File does not exist: /htdocs.
Here's my config file from the apache2/sites-available folder:
Code:
I diff'ed this file with the default and the only differences are in the DocumentRoot line and the <Directory ...> line.
My public_html folder has permissions 755 and the index.html file is 644.
I have a Dell laptop which originally was strictly a Windows computer; with a LiveCD of PCLinuxOS, I partitioned the drive to make room for dual boot with Linux. Unfortunately, I gave the Root directory too much space, and Home not enough. Is it possible to move anything over to Root to give Home more room? I would get rid of Windows entirely, but for a couple of programs that have no Linux equivalent (at least that I've discovered so far).
iam learning to setup a NFS server with fedora14. I have gone through couple of materials for this topic. I have a doubt. Say if i have user1 till user5 on my NFS server with their home directory under the /home and the /home directory is shared. If user1 logs into a client machine then will he be able to see home folders for the other users or just his own home folder. Because in the /etc/exports file there was an option saying "subtree" and according to my understanding this means that the subdirectories under /home will also be shared. Does that mean all the users should be able to see all other users home directory and its contents but not read/write?? Correct me if iam wrong.
I have FC10 newly installed, and Apache is serving content from /var/www/ okay.
I'm trying to get Apache to serve web content from user's home directories. This is what I've tried with no success:
Uncommented 'UserDir public_htm' in /etc/httpd/conf/httpd.conf and commented out 'UserDir disabled'.
And...
Uncommented user directory section in /etc/httpd/conf/httpd.conf. It now reads as follows: # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. #
[Code].....
I also tried setenforce 0 to temporarily disable SELinux until the next reboot. No luck. It doesn't appear to be an SELinux issue.
That's as far as the information available will take me. I still get URL 'Not Found' when I try to access http://192.168.0.2/~myusername/
My machine telling me that my home directory is running out space,It is said 95% in usage.Try to delete the big unwanted files in users (just two user in my machine),df ing, but the home usage status keep on 95%.
Spotify released a native linux client about a year ago. It would be awesome if I could use it on my linux desktop at work. Unfortunately, these computers are managed by a central server and so I can't install anything without system admin rights. I was wondering if there was a binary available that I could run from my home directory? The operating system we use is openSUSE 11.3 64-bit.
I've a user account in a remote machine. but it doesn't have a home directory in that machine.Is it possible to create a home directory without having root account details. If yes, how it can be done.
Ubuntu 10.04 64 bit I ran following command to change username; # usermod -c "Real name" -l new_username old_username but forgot adding -m option to move the contents of the old home directory to the new home directory. Therefore; # ls /home old_user_directory
I must to give ssh connection to own customer. So I want to lock ssh user on own home directory. It is not necessery to reach other folders. I know that ftp user can lock on own folder but I don't know how to lock ssh user.
I am having problems setting up SFTP on a Red Hat server to clamp users down to their home directory. I have created the user, removed /bin/bash login shell and replaced with the below in the passwd file. The user can login by sftp but can browse around the server and download any files apart from other users file. Have also assigned the user over to the sftp user group.
Code: SFTPUser:x:515:515::/home/SFTPUser:/usr/libexec/openssh/sftp-server Added following section to file - /etc/ssh/sshd_config
Code: Match Group sftp ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no
Is there a way where i can chroot their user home directory, lets say the user login on linux box /home/user, what i wanted to do is to chroot /home/user where user won't be able to browse the filesystem which is /. Tnx
How do I change user's home directory, because right now everything saves into File System and it's almost full(I got windows and Ubuntu installed in the same partition), while the other 120Gb filesystem is unused..