LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-30-2016, 05:57 PM   #1
TBotNik
Member
 
Registered: May 2016
Posts: 389

Rep: Reputation: Disabled
Apache User Permissions


All,

I have Apache2 installed on Kubuntu 14.04 on my Aspire Laptop and constantly get 403 permissions errors on all my alias directories.

I had previous problems that I posted/resolved at:

http://www.linuxquestions.org/questi...nk-4175591291/

but not good at finding/setting "service" user accounts because I have no idea what they think they need in the way of permissions. However I think I remember somewhere that the Apache user is "www-data" but not sure.

Cheers!

TBNK
 
Old 11-30-2016, 06:16 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,634

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
did you set up your server something like this, knowing that the naming convention can be changed to what ever you want?

Code:

Using Unix Groups

Most users will want to be able to modify their content without being root.
The easiest way to achieve this is through the use of Unix Groups; you create
a group to which you add your content editing user, then you add the httpd 
user to that group.

Note that this doesn't easilly extend to more than one user who needs to
edit the files, since at that point you need to set Group write on the files.
One would need to use ACL's to achive this.

For example, we have a user "alice" who needs to edit our content, stored
in /var/www/html/

First we create the content group, then we add both alice and apache to it.

# groupadd www-content 
# usermod -aG www-content <user-name>
# usermod -aG www-content _apache

Now we need to set the right permissions on our files.

# chown -R alice:web-content /var/www/html
# find /var/www/html -type f -exec chmod 640 {} \;
# find /var/www/html -type d -exec chmod 750 {} \;

What we've done here is to set all files to 640, or rw-r----- and directories
to rwxr-x---. Because the group "web-content" is applied to all the files
and directories, httpd can read these files, but cannot write to them.
 
Old 12-01-2016, 07:57 PM   #3
TBotNik
Member
 
Registered: May 2016
Posts: 389

Original Poster
Rep: Reputation: Disabled
All,

Found the issue! I deleted the VH wrappers of:

<VirtualHost *:80>
and
</VirtualHost>

and now everything works. Don't remember how those got into my aliases.conf file, but they were the problem.

Marking closed!

Cheers!

TBNK
 
  


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
.js file with permissions 640, owned by apache user cannot be accessed thru browser secretlydead Linux - Server 2 09-20-2012 09:07 AM
apache + userdir + proper user directory permissions = ???? neocontrol Linux - Server 1 03-26-2008 11:23 AM
Apache user directories permissions Wordan Linux - Networking 9 07-14-2006 04:42 PM
Super User For Apache..!! CBQ permissions...help..!!! ujjwal_wadhawan Red Hat 1 03-03-2006 07:53 AM
Apache user directory permissions AMMullan Linux - Software 11 12-23-2004 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration