Create folders and give permission in Remote Virtual Machine

This article has some useful commands I came across while doing the research lab work. To remotely login into a virtual machine,  creating a user group, and giving permission to the group to access that folder.
This is done by changing the group ownership of the directory.

Remotely log in to the virtual machine
ssh username@[ip]

Login from user account and goto the root terminal.
su root

Creating a group
sudo addgroup groupname

Creating a user into this group
sudo adduser username groupname

View all groups
groups
cat etc/group


Change owner and group of a file or directory
chown {-R} [user]{:group} [file|directory]

Change folder permission only of a group(not user)
chgrp {-R} [group] [file|directory]

Change permission(read write execute of directory ProjectData to the group and user)
cat /etc/group chmod 770 ProjectData


Comments

Popular posts from this blog

Sniffing GSM traffic with hackRF

Save recorded data with hackRF to a .raw file