• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

FTP problem

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?

Richard.H
0
RICHARDH
Asked:
RICHARDH
  • 5
  • 5
  • 2
  • +1
1 Solution
 
psimationCommented:
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.
0
 
RICHARDHAuthor Commented:
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.

Regards

Richard.
0
 
psimationCommented:
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.
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
xberryCommented:
to ' psimation ' :

Hi ' psi ',

kindly asking you for giving advice  to ' nagasrinivas ' in the linux printing topic area:
http://www.experts-exchange.com/jsp/qShow.jsp?ta=linuxprinting&qid=20144008

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.    
0
 
psimationCommented:
Hi Xberry
Ok, I will go there and see what I can help with.
(thanks for the advertising ;) )
0
 
xberryCommented:
Thank you (!) :-)
0
 
psimationCommented:
Xberry
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!
0
 
amp072397Commented:
RICHARDH:

You have many open questions:

http://www.experts-exchange.com/jsp/qShow.jsp?qid=11342298
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11355858
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11382838
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11415199
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11670638
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20001107
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20004454
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20065368
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20073152
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20084825
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20084821
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20086663
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20086784
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20107892
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109405
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109357
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20109887
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20110886
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20117400
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118020
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118934
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20118648
http://www.experts-exchange.com/jsp/qShow.jsp?qid=11342618
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20130049
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20132692
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20142937
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20146293
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20147289
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20148615
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20149087
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20148609
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20150501
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20150630
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154720
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154865
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20154980
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20155947
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20180018
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20189434
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20193459
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20222409
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20235436
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20244279
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20244276
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20193051
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20256056
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20257136
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20257135
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20127746
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20259971
http://www.experts-exchange.com/jsp/qShow.jsp?qid=20259964

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:
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
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).
CS:  http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
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!


thanks!
amp
community support moderator

1/27
0
 
xberryCommented:
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 ?


0
 
psimationCommented:
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...
0
 
xberryCommented:
> 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





 
0
 
RICHARDHAuthor Commented:
Sorry for the delay in crediting.
Thanks for the help.
Problem now solved.

Richard
0
 
xberryCommented:
Hi Richard,

thanks for grading psimations answer.
You're welcome.

Regards,

xberry

(I'm not a moderator ; )
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!

  • 5
  • 5
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now