0

I'm in a predicament where I need to set a user: ftpuser (that does not have sudo access) to it's home directory and not do anything else apart from be in that directory. However this directory is inside the root folder, I cannot move the directory as it needs root to be able to run. Can anyone help me?

I've done:

sudo usermod -d /root/fivem ftpuser

I've read in the

etc/passwd

That it is set to /root/fivem however when I join via FTP it puts me in / and not in /root/fivem.

Does anyone have any suggestions?

1
  • Any reason for what really is a really stupid idea? If you want to do this you create a new directory in root (preferably a mount point).
    – Rinzwind
    Jun 15, 2018 at 7:10

1 Answer 1

0

The default permissions for /root are rwx------, so your user can't access his home directory /root/fivem. You must set the permissions of both /root and /root/fivem so that it can be accessed by ftpuser.

(I don't know if that's a good idea, but if you absolutely want to use such a home directory, it is necessary.)

1
  • just add the reading permission at /root is necessary to access /root/fivem, and he can add more permission at ``/root/fivem` if he needed it
    – damadam
    Jun 15, 2018 at 6:55

You must log in to answer this question.

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