Jump to content

[SOLVED] Ubuntu


Recommended Posts

I have set up php/apache2/mysql on Ubuntu, and the "localhost" directory is in ~File System var/www. I want to create a folder in that location, but the option is ghosted out in the file menu.

 

I am obviously new to Ubuntu. My current goal is to be able to use Filezilla to download and upload files from this www directory. I can't download to this directory right now.

 

Thanks for any help.

Link to comment
Share on other sites

You probably don't have permissions to write to this directory. I'm not sure exactly how Ubuntu goes about setting things up, but you can try this.

 

The first thing you will need to do is change the directories permissions to make sure it is group writtable, open a terminal and type...

sudo chmod 775 /var/www

 

Next, type...

ls -l /var | grep www

 

(That is a small L as is in Ls -L, but it needs to be small.)

 

This should output something like...

drwxr-xr-x  7 owner group  4096 Jun  7  2007 www

 

There are now one of two things you must do.

 

Either...

 

1) If the group is something other than root (ie something like www or www-data) you need to join that group. To do so is simple, type...

sudo gpasswd -a user group

 

Replacing group with the group you wish to join, and user with your username. Now logout and back in and you should be good to go.

 

or...

 

2) If the group is root, you need to change this to a common group that apache users can use to write to /var/www. The first thing we need to do is find out what group apache is already using. Type...

grep Group /etc/apache2/apache.conf

 

You may need to change /etc/apache2/apache.conf to your apache conf file (they vary slightly distro to distro, I use Debian). This should output something like...

Group foo

 

That tells us the name of the group we need. All we need do now is change /var/www to belong to that group, then join that group. Type...

sudo chown :foo /var/www
sudo gpasswd -a user foo

 

Replacing foo with the group in question and user with your username.

 

Now logout and back in and you should be good to go.

 

Hope this helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.