0

I want to ask a question about privileges using an SSH connection. I need to create a user who has full root privileges to a few folders in the main directory, like: /etc/php, /etc/mysql, /var/www and has no access to the other directories.

Does anyone know any method on how to do it?

ThunderBird
  • 1,955
  • 1
    Do you mean read-write privileges? Full root privileges means something else. – user68186 Nov 19 '21 at 14:11
  • 2
  • If you do not trust your user don't let them onto the server. Let him copy the needed files LOCALLY and let him copy them over using ssh to a dedicated directory and let the system put the files to the correct location and correct settings. Keep your system as close to original as possible. Makes for a easier life ;) If you do let him in give him sudo permissions and create backups in case he does something outside those dirs. – Rinzwind Nov 19 '21 at 14:50
  • I have a task to give full permissions to modify those folders and files in to one person who will be responsible for this and this person shouldn't have access to other places on server, just some folders in main directory. – mlodyfelipe Nov 19 '21 at 17:08
  • Yes I think i need read write execute privileges right – mlodyfelipe Nov 19 '21 at 17:08
  • You might consider a virtualization or container option. You could have a LAMP stack with docker, where the appropriate folders are mapped somewhere that this user can access. – Artur Meinild Nov 19 '21 at 17:35
  • Based on the comments from OP it looks like school assignment. If this is not the case, please indicate which version of Ubuntu are you using? – user68186 Nov 19 '21 at 17:55

0 Answers0