Main Menu

Search

LINUX: Using Root User Command To Create Directory Owned By Non Root User and Group?

Below command can be executed as root user to create a directory owned by non root user and group.
install -g <group> -o <user> -d <directory name>

For e.g. if you want to create /tmp/testdir directory which is owned by testuser and testgroup, below command has to be executed as root user.

install -g testgroup -o testuser -d /tmp/testdir

Products to which Article Applies

All Linux Environments


 


tarun boyella

No comments:

Post a Comment