0

I have disabled root on my webserver account for security purposes, and have granted root privileges to another user in order to use that user instead of having to keep re-enabling root just to check error logs.

Filezilla still gives me a PERMISSION DENIED when using SFTP, but not completely. I can access SOME extra stuff, but definitely not the root/home directory where I need.

Any ideas? Did I do something wrong when adding user? Is there a way to test this?

Thanks in advance.

1
  • 1
    You should include how exactly you "granted root privileges" and how you created the user. Commented Dec 21, 2016 at 8:06

1 Answer 1

0

Unless you changed it, the root home directory directory /root is owned by root and can be accessed by users in the root group. Some of the access restrictions may simply be explained by missing group membership for your new user.

To find out what groups a user belongs to:

groups username

To add an existing user to a group:

usermod username -A groupname

To create a new user with group membership:

useradd -G groupname1,groupname2 username

I would not recommend adding a user to the root group though. I would create something like an "admin" group and control access that way. Also, another good way to limit root access is using sudo

1
  • Sudo is great, but not for FTP usage, as there is nowhere to use sudo there. I added my user the group 'wheel' which is supposed to have root like privileges, but for some reason, it does not. I need to leave root disable, and still have access to my sftp files.
    – SidedTech
    Commented Jan 9, 2017 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .