Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering if I could get some help with FTP, atleast I'm pretty sure it has to do with FTP. Although it could have to do with something else, I'm not 100% sure..

Now, for fare warning, I'm no ubuntu dominator, I'm pretty newb. Anyway, I've attempted to build a webserver to to test php and what not for a site I'm building. Now everything works, the php, the sql etc.

By the way, I built this in VMware, so it's virtual, over a network, so I can access stuff from anywhere. I'm in a college right now so yeah.

The one problem I have is this. I go into the terminal, and do ifconfig to find my IP. I get it and go to a browser on a different machine and type that IP in. I get the "index of/" page, where I can browse the website I'm making. I can click through folders and what not. I can click on things and they open up.

Now lets say I'm working on my desktop and open up an FTP and drag and drop something into there, go to the IP in the browser again and try to open it. I either get

"Server error The website encountered an error while retrieving http://my_server_ip/phpinfo.php. It may be down for maintenance or configured incorrectly. Here are some suggestions: Reload this webpage later."

or "Forbidden

You don't have permission to access /html.html on this server."

But, lets say I make it on the server itself, and try, bam, magic it works.

I'm sure I set the permissions to let everyone open and view the files, but maybe I didn't? I'm not sure, and this is where I was hoping I could get some help.

By the way, I followed a tutorial on changing the www folder (apache) from /var/www to home/"user"/www. I can't recall how I did that, but it's there and my ftp goes to the home/"user"/www folder.

But yeah, any and all help is appreciated. Like I said, I'm really new to this, but I do enjoy attempting to make these servers and learning how they work, so it's not like making this webserver is a project for a class, It's just assisting me in testing stuff for another class and possibly other websites later on down the road.

Anyway, anyone who decides to help, thanks so much, I'd really appreciate it.


P.S. I'm using Ubuntu 11.10 desktop edition with a LAMP server

share|improve this question

This is obvious, if you'd have looked up the manual. You are running Apache under a different user/group than the user which is uploading the files. So this is a permission problem, I'm fairly certain.

What you need to do is set a umask for your ftp uploads, so that the webserver can actually read (and if it s a script execute) the files. Lookup Unix Discretionary Access Control (DAC) and/ort unix filesystem permissions.

You will need something along the lines of 750 if the group of the files is your webserver, or 755 if it's not. Also make sure not not connect the system to the Internet, as you are not ready to run a real server just now (no offence!).

I recommend to start reading about general unix stuff and especially this document to solve your problem by yourself:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.