How to use Filezilla SFTP with root disabled?

0

2

CentOS 7, I have root disabled for obvious reasons, and because of this I cannot use Filezilla SFTP as folders are denied to other users.

I added a user to the 'wheel' group successfully, but although it connects, I cannot get into the folders (specifically the error logs) because I am not root.

Is there a way to modify a user so that FileZilla or any other FTP program will allow FTP to the home folder?

SidedTech

Posted 2017-01-14T04:03:00.753

Reputation: 393

I can get into SFTP since adding user to wheel, but I can't move from the folder I am in without the error:

Directory /home: permission denied Error: Failed to retrieve directory listing – SidedTech – 2017-01-14T04:09:21.260

It is unclear what folder or files are you going to access. By default, /home directory is accessible for everyone to see its content – Oleg Bolden – 2017-01-14T05:36:02.757

You should not need root access for SFTP (you probably do something wrong), but if you really need to, you can allow only public key authentication for root, which is quite safe. – Jakuje – 2017-01-14T14:25:49.337

@OlegBolden I need to access the /var/www folders, etc. – SidedTech – 2017-01-14T19:32:15.800

1I'd recommend removing unpriviledged user from the wheel group. To access files in /var/www folder and it subfolders under user account set this ACL: setfacl -Rm d:u:user:rwX,u:user:rwX /var/www – Oleg Bolden – 2017-01-14T20:58:18.150

@OlegBolden - I still user the wheel user for SSH, but it's just filezilla that gave me the issues. I don't want to enable root just for SFTP. I will give what you wrote a shot. – SidedTech – 2017-01-18T03:42:51.680

@OlegBolden Please submit that as an answer, thank you :) – bertieb – 2018-02-18T11:06:34.977

Answers

0

As betrieb suggested I submit my comment as an answer.

To access files in /var/www folder and it subfolders under user account set this ACL (you need root priviledges to do it):

setfacl -Rm d:u:user:rwX,u:user:rwX /var/www

Oleg Bolden

Posted 2017-01-14T04:03:00.753

Reputation: 1 507