LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   pure-ftpd root login (https://www.linuxquestions.org/questions/linux-software-2/pure-ftpd-root-login-933977/)

pauliolio 03-11-2012 11:58 PM

pure-ftpd root login
 
Hi,

First off, slight miss-naming of the thread - I should have called it 'pure-ftpd log in with root access' or something similar.

I know people are going to say I shouldn't do it, but I have no choice as far as I know because I HAVE to use a bit of software that requires it.

I need to be able to log into a server as a user that has permissions to read & write any files in any directory no matter what or where, and as far as my very limited linux knowledge goes that means root.

Can someone please tell me how to set up pure-ftp to allow this?
I can log in with the user name 'root', I can go to any directory I want, but I can't remove or add files.

I've read through every file I can find telling me how to set it up, but none of them cover this. Yes I know there's a good reason why, but...

Anyone, please?

bathory 03-12-2012 03:31 AM

Hi,
Quote:

Can someone please tell me how to set up pure-ftp to allow this?
You should start pure-ftpd using a "-u0" option.

Sorry but I have to say this:
If you want to transfer files as root (not recommended for various reasons), it's better to use scp of sftp, so at least your login details are transmitted encrypted

Regards

pauliolio 03-12-2012 03:52 AM

Many thanks Bathory
 
But I have no choice - The other program I need to use doesn't use scp or sftp - It's got to be FTP.
I need to use FTP, and I need to be able to go to several completely different areas of the file system with different user/group ownership/permissions, and be able to create/modify files & directories.


In the config file I already set the minimum uid to 0 and this does not let me connect as root with root privileges though. Does -u0 do things differently?

What I really don't get is why logging in as root doesn't log me in as 'root'?

bathory 03-12-2012 04:15 AM

Quote:

In the config file I already set the minimum uid to 0 and this does not let me connect as root with root privileges though. Does -u0 do things differently?
No it's the same thing (0 is the minimum allowed uid)


Quote:

What I really don't get is why logging in as root doesn't log me in as 'root'?
What is your distro? If it's an RHEL based, it could be SELinux, preventing certain actions through the ftp protocol

pauliolio 03-12-2012 04:36 AM

Hi Bathory,

Many thanks - It's so nice to meet someone that doesn't stop at 'Don't' :)

The server's running Centos 5.6 - Which is a rhel cookout.

There's an @SELinux file in the /etc/sysconfig folder, bu there're only 2 uncommented-out lines in there.
The first says that selinux is disabled, and the other that the selinuxtype is targeted.

One of the things that I have learned about Centos though is that just like any other system, just because you find a line in a config file that says something is switched of, don't assume that it is because this may not be the actual config file that the system's using.

Looking into selinux atm.

bathory 03-12-2012 05:20 AM

Quote:

There's an @SELinux file in the /etc/sysconfig folder, bu there're only 2 uncommented-out lines in there.
The first says that selinux is disabled, and the other that the selinuxtype is targeted.
I guess it's already disabled, but you can verify it, running
Code:

sestatus
In this case check the various logfiles to see why you can't write as root through ftp


All times are GMT -5. The time now is 03:04 AM.