Hello!
I’m using OOD 3.1.1 and trying to configure the creation of a home directory when a user logs in.
For this purposes I use a parameter in ood_portal.yml
pun_pre_hook_root_cmd: ‘/pun_pre_hook’
The “pun_pre_hook” script is very simple
#!/bin/bash
## script accepts a string "--user USERNAME" from OOD
## so USERNAME is the second parameter - $2
# check if user's home directory exist, if not create it
if [ ! -d /home/$2 ]; then
mkdir /home/$2
chown -R $2:$2 /home/$2
fi
But when a user without a home directory logs in, every time an error occurs “Permission denied @ dir_s_mkdir - /home/test”
I don’t understand why this is happening. The documentation says that “pun_pre_hook_root_cmd” runs with root rights.
I am attaching a ondemand-nginx error.log file
error.txt (5.1 KB)
Please help me solve the problem.