sKunKbad Posted February 6, 2008 Share Posted February 6, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89685-solved-ubuntu/ Share on other sites More sharing options...
trq Posted February 6, 2008 Share Posted February 6, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/89685-solved-ubuntu/#findComment-459696 Share on other sites More sharing options...
sKunKbad Posted February 6, 2008 Author Share Posted February 6, 2008 Thanks thorpe. Everything is now working fine. Quote Link to comment https://forums.phpfreaks.com/topic/89685-solved-ubuntu/#findComment-459938 Share on other sites More sharing options...
trq Posted February 7, 2008 Share Posted February 7, 2008 Just out of interest, which of the two procedures did you need to use on Ubuntu? Quote Link to comment https://forums.phpfreaks.com/topic/89685-solved-ubuntu/#findComment-460712 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.