LAMP + ProFTPd Permission Settings - Ubuntu 9.04

Hello everyone,

I just got a Linode yesterday, it must have been the smartest decision I've made in a very long while ^^. I am extremely pleased with the cute control panel and the rapid and responsive access to it via SSH, HTTPd, the Control Panel, etc…

Now, being a complete novice at VPS usage, I need a bit of help setting up the server. I've come from a history of cPanel and shared hosts, but I have do play around with Ubuntu Linux since the 7.x days (good times).

I got LAMP, PHPMyAdmin and ProFTPd installed using APT/Tasksel without issue, but I start running into problems when I try to install scripts. Apache did not seem to have write permission in /var/www, I tried to install Joomla!, but it said the configuration file was not writable. I checked the permissions, and it said /var/www was owned by GROUP root USER root. And it was rwx-r-x-r-x, meaning that only root could write to the files. After a little bit of research, I discovered that www-data was the user/group that Apache uses on Ubuntu (also specified in /etc/apache2/envvars). I chmod'd and chgrp'd /var/www recursively. So that www-data was the sole group and user of it. Joomla!/Apache/PHP now has permission to write and install the script now. My great question is this: Am I 'suppose' to chmod and chgrp /var/www to www-data from root? Is this safe and secure? What do you, the normal and pro people do? (I'm a newb who gets 0.8 k/d in FPSs… =(.)

My other issue is ProFTPd, I created a group called ftpusers from the command line, and I commented out the #user line in /etc/proftpd/proftpd.conf and specified the group to be ftpusers. I then created myself as a user and added myself to the group. I can login without any issue and access /var/www (whom everyone has read access to), I even got myself write permissions. I want to upload files with the www-data/www-data group and user permissions, not as me/me. Is there anyway I can accomplish this with proftpd?

Thanks for your help. =b

2 Replies

Use chown to change it to www-data.www-data


Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct