set_permissions.sh is not compatible with secure_access_group

interfasys

Verified User
Joined
Oct 31, 2003
Messages
1,821
Location
Switzerland
"Can you please fix the set_permissions.sh script to take into account the secure_access_group option?"

set_permissions.sh will change the permissions to username:username instead of keeping username:access
 
Last edited:
This is the feature request section. What feature would you like to have added?
 
There is nothing to fix.

That is what it is supposed to do.
I disagree. The script is supposed to fix your system's permissions according to your DA config. I'm not talking about custom permissions that DA wouldn't be able to take into consideration, but what comes as standard with a DA install, including the possible options.
 
The script is supposed to fix your system's permissions according to your DA config.

No it does not. It uses the passwd file to determine the owners and groups for the user home.

Code:
set_user_home()
{
        log "set_user_home $1";
        UHOME=`grep -e "^${1}:" /etc/passwd | cut -d: -f6`

If you want you can modify the script to do something else or you can run the code from the link in the previous post.
 
Exactly, it does not in its current form, but it should.

Something like:
If DA_secure_access_group then
set_file $UHOME $1 $access 711
etc.
else
set_file $UHOME $1 $1 711
etc.

Of course we could all remember to launch the echo command after launching that script, but since there is already a script, why not fix it?
 
Exactly, it does not in its current form, but it should.

Whether it should or shouldn't is a matter of opinion.

In your first post you did not ask for anything. You simply made a statement.

A request would be in the form of "Can you please fix the set_permissions.sh script to take into account the secure_access_group option?"
 
A request would be in the form of "Can you please fix the set_permissions.sh script to take into account the secure_access_group option?"
True, I assumed scripts coming with DA would cater for all DA created situations, which includes having user folders placed in a special group.
 
Hello,

Thanks for the bug report. I've added this code into the set_user_home() function, at the end:
Code:
        SAC=`grep -c secure_access_group /usr/local/directadmin/conf/directadmin.conf`
        if [ "$SAC" -gt 0 ]; then
                echo "action=rewrite&value=secure_access_group" >> /usr/local/directadmin/data/task.queue
        fi
Fairly simple, and will maintain accuracy if we ever change how it works through DA.

John
 
Hello,

Thanks for the bug report. I've added this code into the set_user_home() function, at the end:
Code:
        SAC=`grep -c secure_access_group /usr/local/directadmin/conf/directadmin.conf`
        if [ "$SAC" -gt 0 ]; then
                echo "action=rewrite&value=secure_access_group" >> /usr/local/directadmin/data/task.queue
        fi
Fairly simple, and will maintain accuracy if we ever change how it works through DA.

John

This line of code does not fix the issue. I already have these 4 lines of code in my version of set_permissions and it fails to set the home directories to user:access.
 
Back
Top