LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FTP client can't access files in /var/www/html (Apache ) (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-client-cant-access-files-in-var-www-html-apache-730077/)

dshap 06-02-2009 03:29 AM

FTP client can't access files in /var/www/html (Apache )
 
I'm running CentOS 5.3 and I have pure-ftpd as my FTP server. I'm using the FlashFXP FTP client on Windows and I'm trying to access files on my server. Every file I've tried to access has worked fine except the files in the Apache /www/html folder. FlashFXP just says "Unable to open specified file." My guess is that this is some kind of file permission issue or maybe an Apache configuration issue that I'm not aware of.

Obviously I'm very new to Linux/Apache and if anyone could shed some light on this issue I'd appreciate it very much.

Thanks.

- dshap

LaroPol 06-02-2009 04:06 AM

do a

ls -l /www/ | grep html

look at the permissions.
Does the user (you are using to ftp) have permissions to that folder ?

dshap 06-02-2009 04:41 AM

Quote:

Originally Posted by LaroPol (Post 3560080)
do a

ls -l /www/ | grep html

look at the permissions.
Does the user (you are using to ftp) have permissions to that folder ?

Thanks for the reply. I'm not sure where I should enter this command. I've tried it in numerous directories and I always get "ls: /www/: No such file or directory".

The user I am using to FTP is "root" which I thought had permission to everything - is this not true?

Please let me know where I should enter that command so that I can see what the problem is.

Thanks.

chrism01 06-02-2009 06:50 PM

That's because your title says /var/www (which I'd expect on centos) ..

dshap 06-02-2009 07:58 PM

Quote:

Originally Posted by chrism01 (Post 3560928)
That's because your title says /var/www (which I'd expect on centos) ..

Sorry about that, my bad.

[root@localhost /]# ls -l /var/www/ | grep html
drwxr-xr-x 4 root root 4096 Jun 2 01:18 html


Does this output indicate that I wouldn't be able to view/edit files with the "root" FTP account? If so, how can I change that?

Thanks.

rikxik 06-03-2009 12:30 AM

The file permissions on html directory mean that the files can be edited by "root" user and everyone else can only read them. So in short, you should be able to edit them provided the individual files in this html directory are writable.

Post output of:

Code:

ls -la /var/www/html

dshap 06-03-2009 01:30 AM

Quote:

Originally Posted by rikxik (Post 3561205)
The file permissions on html directory mean that the files can be edited by "root" user and everyone else can only read them. So in short, you should be able to edit them provided the individual files in this html directory are writable.

Post output of:

Code:

ls -la /var/www/html

Okay your post got me thinking...I tried a different FTP client made by SSH Secure Shell and it let me edit the files. Why would this be? I'd like to use FlashFXP. FlashFXP can edit any files OTHER than the html directory files it seems.

Here is the output you asked for:

Code:

[root@localhost /]# ls -la /var/www/html
total 40
drwxr-xr-x  4 root root 4096 Jun  2 01:18 .
drwxr-xr-x  8 root root 4096 May 28 09:54 ..
-rwxr-xr-x  1 root root 5747 Dec 29 10:21 atomic-release-1.0-10.el5.art.noarch.rpm
-rwxr-xr-x  1 root root  35 May 29 22:51 index.php
drwxr-xr-x 10 root root 4096 Jun  2 01:19 phpMyAdmin
drwxr-xr-x 11 root root 4096 Jun  2 00:52 phpPgAdmin
-rwxr-xr-x  1 root root 1344 Nov  8  2004 RPM-GPG-KEY.art.txt

Thanks.

rikxik 06-03-2009 01:42 AM

Doesn't make any sense to me - changing ftp clients shouldn't make any difference in basic get/put operations. Btw, what you mean exactly by "edit"? You are doing a "put" to /var/www/html?

It would be useful if you can cut/paste the output generated by your ftp client - that'll let us see exactly what your inputs are and the output from the session.

dshap 06-03-2009 12:12 PM

Quote:

Originally Posted by rikxik (Post 3561259)
Doesn't make any sense to me - changing ftp clients shouldn't make any difference in basic get/put operations. Btw, what you mean exactly by "edit"? You are doing a "put" to /var/www/html?

It would be useful if you can cut/paste the output generated by your ftp client - that'll let us see exactly what your inputs are and the output from the session.

You know what? I'm an idiot.

I'm on a new computer and I just copied over all of my FlashFXP settings from my old computer and the client is configured to open .php files with an editor that doesn't exist on my new computer. That's what "FlashFXP cannot open this file" means. I should have tried more file types which is why, as I said before, I am an idiot.

I appreciate all of your help, as always.


All times are GMT -5. The time now is 08:51 PM.