Problem userdir ~username on apache


 
Thread Tools Search this Thread
Operating Systems BSD Problem userdir ~username on apache
# 1  
Old 07-11-2009
Problem userdir ~username on apache

i have problem user cannot add or edit file on their directory
i mean /home/user/public_html

i have httpd.conf like this :

................

# UserDir
Include etc/apache22/extra/httpd-userdir.conf


and httpd-userdir.conf

................
#
UserDir public_html
UserDir disabled root toor daemon operator bin tty kmem games news man sshd bind proxy _pflogd _dhcp uucp pop www nobody mail
null smmsp
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>


and permision user at home directory

before:

sipitung# ls -ll
total 18
-rw-r--r-- 1 moslemovic www 758 Jul 12 05:24 .cshrc
-rw-r--r-- 1 moslemovic www 258 Jul 12 05:24 .login
-rw-r--r-- 1 moslemovic www 167 Jul 12 05:24 .login_conf
-rw------- 1 moslemovic www 379 Jul 12 05:24 .mail_aliases
-rw-r--r-- 1 moslemovic www 339 Jul 12 05:24 .mailrc
-rw-r--r-- 1 moslemovic www 773 Jul 12 05:24 .profile
-rw------- 1 moslemovic www 284 Jul 12 05:24 .rhosts
-rw-r--r-- 1 moslemovic www 980 Jul 12 05:24 .shrc
drwxr-xr-x 2 root www 512 Jul 12 06:22 public_html

after owner i change to public_html

-rw------- 1 moslemovic www 284 Jul 12 05:24 .rhosts
-rw-r--r-- 1 moslemovic www 980 Jul 12 05:24 .shrc
drwxr-xr-x 2 www www 512 Jul 12 06:24 public_html


test via browser is running :
Index of /~moslemovic


but when i try to edit

test.txt

hhahhahhhahhahhhaha

Error: test.txt: Permission denied.


Ask:
what can i do about this configure to httpd.conf and user directory owner, i make home because i wan give access ftp to home user.

thanx for your repply


Moslemovic

Last edited by moslemovic; 07-11-2009 at 09:28 PM.. Reason: made links visible
# 2  
Old 07-11-2009
Yow can't change public_html to www and not give group write on the file to the user if you want to be able to edit the file.
# 3  
Old 09-14-2009
As root,

cd ~moslemovic
chown -R moslemovic ./public_html
chgrp -R www ./public_html
chmod -R 755 ./public_html

That way moslemovic can edit any file in the folder and www can read/execute anything in the folder.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Retrieve the username which got authenticated by the apache

I have an apache 2.2 setup with LDAP auth enabled. The html form in the front end takes some values and processes them using perl script in the background. Is there a way I can get the username which is submitting the values in that perl script. I am planning to track who is doing what(with the... (1 Reply)
Discussion started by: Tuxidow
1 Replies

2. Shell Programming and Scripting

Javascript or HTML to retrieve apache username

I have a internal wesbite set up and any visitor must enter username / passwd as defined in apache (I've set these up using htpasswd) I use cgi scripts set up using ksh or javascript to populate pages / tables etc. I want to be able to get the apache username that the used authorised... (3 Replies)
Discussion started by: frustrated1
3 Replies

3. UNIX for Dummies Questions & Answers

problem with character @ inside username to use pop3 with nail

Hi: I am trying to read mails using pop3 protocol with the nail client. I have configurated the following files: .mailrc set NAIL_EXTRA_RC=~/.nailrc .nailrc shortcut myisp pop3://developers@afinformatica.com@mail.afinformatica.com set... (2 Replies)
Discussion started by: chemi
2 Replies

4. Web Development

Problem setting up apache

Hello there, I installed Ajaxterm on my Ubuntu 9.04 machine, and it's running ok if I use : http://localhost:8022/ in my browser. The problem is that I wanted to be able to acces it from somewere else through the internet. I read some instruction and help sites related to this problem, like :... (2 Replies)
Discussion started by: spiriad
2 Replies

5. Debian

apache problem

hi all, I can't get my index.html to display on the web browser. Please point it out the reason. this is what i had done so far: 1. I have registered a dns name pointing to my public ip (it is done automatic) 2. my server name is set same as the dns name 3. I have configured... (14 Replies)
Discussion started by: k2k
14 Replies

6. Red Hat

Problem in apache

Can anyone guide, what should be the entry in httpd.conf file to host a site in Redhat Ent Linux 5 without using nameserver? Or process to set apache server in same dist of Linux. Any link to understand apache well will be much appreciable. (3 Replies)
Discussion started by: naw_deepak
3 Replies

7. UNIX for Dummies Questions & Answers

Apache 2.2 problem

Hi all, I'm a user of Debian 4.0. I installed apache 2.2 and add the functionality to support ~/public_html for each user. This is the permission of my public_html: drwxr-xr-x 4 mj test 4096 2007-12-20 20:17 public_html When I wanted to go through it and list the directory via my browser,... (6 Replies)
Discussion started by: mjdousti
6 Replies

8. Solaris

Apache start problem

Hi, I have installed apache webserver on my solaris 10(x86). When I tried to start the server it gives following error, ld.so.1: /usr/local/apache2/bin/httpd: fatal: libssl.so.0.9.8: open failed: No such file or directory Killedld.so.1:: Too many arguments Can somebody please guide me how... (1 Reply)
Discussion started by: maheshsri
1 Replies

9. Solaris

Apache with SSL problem

Hi All, I'm attempting to build Apache 1.3.27 on a new Solaris 9 system. I am using following "Option 2" in the INSTALL of the mod_ssl-2.8.12-1.3.27, and I'm stumped. After I configure and make all the required components the make of the Apache server itself stops at: flex... (2 Replies)
Discussion started by: b_manu78
2 Replies

10. UNIX for Dummies Questions & Answers

userdir

In the apache documentation, they say to enable UserDir for all users except a specific list, write this: UserDir Enabled UserDir Disabled user1 user2 user3 But configtest gives me: "Syntax error on line 533 of httpd.conf: UserDir "enable" keyword requires a list of usernames." When I... (1 Reply)
Discussion started by: Synbios
1 Replies
Login or Register to Ask a Question