Yet another permissions and ownership question for Apache

OK, running a LAMP stack on Ubuntu 11.04 for quite sometime. I quickly followed the Library article for jailing my sftp users following http://library.linode.com/security/sftp-jails, which has me create a usergroup named filetransfer. And this has worked fine for a while.

I am trying to get the forum on one of my sites to be able to FTP automatically file updates, AutoMOD installs etc. So I installed WU-FTP, and was able to at least let the board system login to the FTP service. From here though is where I think things are getting wonky as sometimes I get random failures from some of the MOD scripts when trying to copy files systematically from an uploaded zip. Those familiar with phpBB likely know the process of installing a MOD, but if someone needs more explanation, let me know…

When I first setup the LAMP stack, the /srv/www/domain.com/public_html/ folders were owned by username:username. Than after following the guide for jailing, over time uploading files and such, I've ended up with a mix of ownerships from username:username, username:filetransfer, username:root, and some even have root:root…

So, my question is, should all of public_html, all folders, files, subdirs and files within, be owned by username:username, given my setup? In my specific case, username is in both of the groups username and filetransfer, with file transfer listed as it's "primary" according to Webmin.

1 Reply

In the sftp jails article, based on the following step, I believe the public_html directory and everything within should be owned by username:username. Correct?

> After issuing these commands, the affected users won't be able to create files in their home directories as these directories will be owned by the root user. You'll want to create a set of directories for each user that they have full access to. Issue the following command for each user, changing the directories created to suit your needs:

cd /home/username

mkdir docs public_html

chown username:username *

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct