Score:0

Privileges to folder in root main directory using SSH

kr flag

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?

ar flag
Do you mean read-write privileges? Full root privileges means something else.
muru avatar
us flag
Does this answer your question? [How to avoid using sudo when working in /var/www?](https://askubuntu.com/questions/46331/how-to-avoid-using-sudo-when-working-in-var-www)
cn flag
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.
kr flag
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.
kr flag
Yes I think i need read write execute privileges right
Artur Meinild avatar
vn flag
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.
ar flag
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?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.