Solved

Beginning Joomla on Ubuntu

Posted on 2011-09-12
3
349 Views
Last Modified: 2012-05-12
I've decided to learn Joomla and I setup an ubuntu environment as a test bed.  I was able to get the basics working.  I am struggling with file permissions.  

I log onto my ubuntu machine as user 'myUser/.  But all the web stuff goes under /var/www  

In order to edit a file i have to 'sudo vi'  or 'chown myUser'.   I eventually got tired of that and did a 'sudo chmod -R 777 /var/www' .  This shotgun method worked, but I can't imaging its good practice.    

How do I setup myUser to edit /var/www for easy editing and still maintain some decent security?

0
Comment
Question by:tmonteit
3 Comments
 
LVL 6

Accepted Solution

by:
yjchong514 earned 250 total points
ID: 36527196
chmod 744 for your user.
Refer: http://www.december.com/unix/ref/chmod.html for command tutorial.

To start your login with /var/www:
1.Adding your user to /var/www:
sudo useradd your_user -p your_password -d /var/www -s /bin/false
sudo passwd your_user

2. change the directory specifications in the /etc/proftpd/proftpd.conf file
E.g:
...
<Directory /var/www>
Umask 022 022
AllowOverwrite off
        <Limit DELE XMKD RNRF RNTO RMD XRMD>
        DenyAll
        </Limit>
        <Limit MKD STOR>
        AllowAll
        </Limit>
</Directory>
.....

Good Luck!

Rgds,

yjchong514
0
 

Author Comment

by:tmonteit
ID: 36527293
Confused... /var/www is the directory of all my web stuff and I can't log in as /var/www.

When I try that command, it says:   useradd:  your_user already exists.

0
 
LVL 4

Assisted Solution

by:undersky
undersky earned 250 total points
ID: 36527524
you can simply add self to www-data group :)

sudo adduser uruser www-data

also chmod 775 /var/www/ -R
sudo /etc/init.d/apache2 restart
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now