Solved

Beginning Joomla on Ubuntu

Posted on 2011-09-12
3
352 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

786 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