vsftp and dodgy permissions

Paul Howarth paul at city-fan.org
Wed Jun 14 08:01:07 UTC 2006


On Tue, 2006-06-13 at 20:22 +0200, syrus wrote:
> Hey all,
> 
> I'm setting up a new server at the moment and I'm trying to get FTP working so I don't have to SSH as much (I use webdrive in Windows) but I've come across a strange problem.
> 
> Now, before anyone starts a-rantin' I know I shouldn't be using root for this stuff anyway, but I'm just doing it while I get set up.
> 
> Anyway, the problem is;
> 
> When I ssh I can see all files and folders with root.
> When I ftp I can't see certain folders. /var/ and /etc/httpd/ specifically.
> 
> I've ssh'd into both my servers to check permissions and they're both the same for those directories and yet one works while the other doesn't. Anyone know of an explanation?
> 
> The old server, which works perfectly, is running Fedora Core 2 pretty much out of the box.
> The new server, which doesn't work properly, is running Fedora Core 5 out of the box.
> 
> The conf files are exactly the same between the servers. It's vsftpd that I'm running on both, so essentially it should be the same.
> 
> Any ideas why the ssh and ftp would behave differently accessing files with the same username and password?

Try this:

Put SELinux in permissive mode:
# setenforce 0

Then try your ssh and ftp again. If it now works as you expected, the
problem is SELinux-related. If not, the problem is a configuration issue
of the servers themselves.

To turn SELinux back into enforcing mode:
# setenforce 1

If the problem is SELinux-related, you'll need to describe exactly what
you want to achieve; what SELinux does is to restrict each server to the
minimum set of capabilities it normally needs to do its job, and that
usually includes preventing httpd and ftpd from seeing each other's
files.

You may also find that if you use sftp rather than ftp then you get
different results.

Paul.





More information about the fedora-list mailing list