FTP problem

Posted on 2001-07-10
Last Modified: 2010-03-18
I have set up an FTP account so I can post files to my Apache folder at /var/www/html but when I try
to upload a page, or rename a file I get Permission Denied.

If I use WebAdmin then I can go to the folder and do what I like.

Any suggestions as to what needs to be changed and where?

Question by:RICHARDH
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
  • +1
LVL 17

Accepted Solution

psimation earned 50 total points
ID: 6270253
You almost certainly have a user/permission problem.
Now, when you created the /var/www/html folder ( or if it was created by the system at install), as what user did you create it, ie, when you issued the command mkdir /var/www/html, as which user did you do it? (if the folder was created by the system, then it is almost certainly owned by "root" and will NOT allow any other user to enter it, except if you change the permissions to it.
A "cleaner" way would be to do the following.
Seeing that it is a bad idea to ftp or telnet or even ssh into a system directly as root, I would suggest you create a user for doing your web related things.
So, create a user called webmaster for instance, with which you will log into the system when you want to upload files to the webfolder. Further, make the default home folder for the webmaster user the /var/www/html folder.
To do this, issue the following commands as root.
adduser -d /var/www/html webmaster
passwd webmaster
(supply passwd twice for confirmation)
Now, just to make 100% sure that the entire /var/www/html folder and all it's contents are owned by webmaster, issue the following command as root.
chown -R webmaster:webmaster /var/www/html
chmod -R 755 /var/www/html
Now, when next you ftp into your server as user webmaster with password as you supplied, you should go directly into that folder and will be able to upload and if Apache is configured correctly, you will be able to view the pages on the internet immediately after uploading.

Author Comment

ID: 6272134
Thanks for the help, will try all this and see what happens.

You did not say anything in the message about setting up an ftp account on the FTP sefver. Do I have to do anything with that.


LVL 17

Expert Comment

ID: 6272233
That's what's nice about Linux, setting up a normal Linux user automatically sets up an "ftp" user. Actually it's not like there are 2 users now, one system and one ftp, they are both the same thing. The ftp daemon uses the systems passwd db to check for authentication.
Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

LVL 14

Expert Comment

ID: 6274233
to ' psimation ' :

Hi ' psi ',

kindly asking you for giving advice  to ' nagasrinivas ' in the linux printing topic area:

To his previous Samba setup question I already gave srinivas the address of your Linuxhelp website.
Also I've already told him where to find the specific SMB HOWTOS. Still he doesn't know how to
get pages from within his Linux applications sent to & printed out on his Windows-Networkprinter.
Myself I do only have some experience with printing from Linux desktops but can't give explicit advice
if Samba-Networking is involved. You seem to be an expert for that.    
LVL 17

Expert Comment

ID: 6274559
Hi Xberry
Ok, I will go there and see what I can help with.
(thanks for the advertising ;) )
LVL 14

Expert Comment

ID: 6274575
Thank you (!) :-)
LVL 17

Expert Comment

ID: 6274589
OK, I've just posted a comment there that should have him printing all his ink out in no time.
Where are you BTW? Europe? Your response is fairly quick!

Expert Comment

ID: 6782317

You have many open questions:

To assist you in your cleanup, I'm providing the following guidelines:

1.  Stay active in your questions and provide feedback whenever possible. Likewise, when feedback has not been provided by the experts, commenting again makes them receive an email notification, and they may provide you with further information. Experts have no other method of searching for questions in which they have commented, except manually.

2.  Award points by hitting the Accept Comment As Answer button located above and to the left of that expert's comment.

3.  When grading, be sure to read:
to ensure that you understand the grading system here at EE. If you grade less than an A, you must explain why.

4.  Questions that were not helpful to you should be PAQ'd (stored in the database for their valuable content?even if not valuable to you) or deleted. To PAQ or delete a question, you must first post your intent in that question to make the experts aware. Then, if no experts object after three full days, you can post a zero-point question at community support to request deletion or PAQ. Please include the link(s) to the question(s).
At that point, a moderator can refund your points and PAQ or delete the question for you. The delete button does not work.

5.  If you fail to respond to this cleanup request, I must report you to the Community Support Administrator for further action.

Our intent is to get the questions cleaned up, and not to embarrass or shame anyone. If you have any questions or need further assistance at all, feel free to ask me in this question or post a zero-point question at CS. We are very happy to help you in this task!

community support moderator

LVL 14

Expert Comment

ID: 6782955
Hi Psi,

> Where are you BTW? Europe?

Yes, I'm in Europe.
Sorry, but two months ago I didn't receive e-mail notifications from quite a many postings, so only today I discovered your little comment.

> Your response is fairly quick !

May I take it as an indicator that you're resident in Europe, too ?
BTW, did the questioner that you helped with in the linuxprinting
TA already finalize his Q & grade your Comment ?

LVL 17

Expert Comment

ID: 6784937
Hi Xberry
No problem, have had a few mail probs myself...

I'm from South Africa (southern europe he he he); regarding the printing question; I have no idea whether that ever got closure, was too long ago...
LVL 14

Expert Comment

ID: 6785109
> I'm from South Africa (southern europe he he he)

Exactly !  Zoom factor on.

> regarding the printing question . . . too long ago

Well time has at least two ends, if you're thinking in linear succession . . .
& problems seem to be existent unless they are solved or turn into anything else, for the better.
So right now EE fairly seems  to resemble the model of an expanding universe as far as
open Q's are concerned.

So I'll look & see which way the Question went


Author Comment

ID: 6790865
Sorry for the delay in crediting.
Thanks for the help.
Problem now solved.

LVL 14

Expert Comment

ID: 6791359
Hi Richard,

thanks for grading psimations answer.
You're welcome.



(I'm not a moderator ; )

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…

691 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