LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Access problem whit userdir/public_html (https://www.linuxquestions.org/questions/linux-server-73/access-problem-whit-userdir-public_html-553001/)

adapter 05-10-2007 07:33 PM

Access problem whit userdir/public_html
 
Hi.

I have sett up a /home/*/user account to my frend so he can play whit joomla/drupal or somthing. But I got a realy bad problem if u make anything from joomla like new folder upload via backend everying is made by user www-data. so then when he is going in via ftp to remove a folder that he has uploaded he dont got access to it.. Can anyone help out. here are som settings for mod_userdir.

I have debian etch 4.0.

config:
Code:

<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>
</IfModule>


here is u see the thing He uploaded not via ftp but in backend of joomla www-data is wrong.
Code:

drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_banners
drwxr-xr-x 5 www-data www-data 4096 2007-05-11 00:17 com_comprofiler
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_contact
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_content
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_frontpage
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_login
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_messages
drwxr-xr-x 2 anders anders 4096 2007-05-11 00:12 com_newsfeeds


I realy hope anyone know how to fix this.

zaichik 05-13-2007 07:46 AM

You can fix this one instance of the issue by logging in as root and changing the ownership of the directory:
Code:

chown anders.anders com_comprofiler
Unfortunately, I don't believe there is any way to change this behavior in the future. joomla is working as it was designed to work; the content that is uploaded is uploaded as the Apache user. It is meant to be accessed via joomla and not via FTP. Sadly, it also creates a security problem: You have a directory there to which any web user has write permissions.


All times are GMT -5. The time now is 01:15 PM.