LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-19-2012, 08:59 PM   #1
illumilore
LQ Newbie
 
Registered: Feb 2011
Posts: 7

Rep: Reputation: 0
APACHE_RUN_USER as user?


My question mostly follows from this dead thread: http://www.linuxquestions.org/questi...-403-a-811319/

After symlinking /var/www to redirect to /home/user/www/, all I get is forbidden errors when accessing, even though ~/www and its contents have read permissions for all. The only way I've found to remediate that is to change APACHE_RUN_USER and APACHE_RUN_GROUP to equal my username, but I've heard that that could be insecure.

Is it really insecure and if so, then how do I fix the "You don't have permission to access / on this server." errors if I switch user and group back to www-data?
 
Old 06-19-2012, 09:17 PM   #2
scandalist
Member
 
Registered: Apr 2011
Posts: 31

Rep: Reputation: 1
Give Apache ownership permissions to said directory

Code:
chown -R www-data /home/user/www/
 
Old 06-20-2012, 01:00 AM   #3
illumilore
LQ Newbie
 
Registered: Feb 2011
Posts: 7

Original Poster
Rep: Reputation: 0
That doesn't seem to work. I still end up getting forbidden, when my envvars contains
Code:
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
and the permissions of the folder in the user dir is
Code:
$ sudo ls -la ~/www
total 16
drwxr-s--x  3 www-data www-data 4096 Jun 19 23:34 .
with /var/www symlinked to ~/www/

I made sure to restart apache2, so it should be running as user www-data, which should have full read and execute access to that folder, but it still doesn't seem to read it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix authenticating user@domain and restrict user to access linux box LinuxGreen Linux - Newbie 1 12-16-2011 10:00 AM
how to create sftp user only in red hat 4 not ftp user ..only sftp user princeu28 Linux - Newbie 1 10-14-2008 08:10 AM
Gconf-editor settings not sticking for root, sudo user, or user when run sandaili Fedora 1 07-19-2008 08:31 AM
C program to see user log on in system and print user with real user name also naveen245 Programming 2 12-21-2005 12:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration