Added checkboxes and a button to the View Connections page for disconnecting multiple users at once.
---- Changes since 1.270 ----
Added checkboxes and a button for deleting multiple shares at once.
+---- Changes since 1.410 ----
+Added fields to set the permissions and group ownership of new shared directories.
print "<td align=right><b>$text{'share_owner'}</b></td>\n";
print "<td>",&ui_user_textbox("createowner", "root"),"</td> </tr>\n";
+
+ print "<tr> <td align=right><b>$text{'share_createperms'}</b></td>\n";
+ print "<td>",&ui_textbox("createperms", "755", 5),"</td>\n";
+
+ print "<td align=right><b>$text{'share_group'}</b></td>\n";
+ print "<td>",&ui_group_textbox("creategroup", "root"),"</td> </tr>\n";
}
print "<tr> <td align=right><b>$text{'share_available'}</b></td>\n";
share_dir=Directory to share
share_create=Automatically create directory?
share_owner=Create with owner
+share_createperms=Create with permissions
+share_group=Create with group
share_available=Available?
share_browseable=Browseable?
share_comment=Share Comment
savefshare_mode='$1' is not a valid share name
savefshare_global=The name 'global' cannot be used for a share
savefshare_owner=Missing or invalid owner for new directory
+savefshare_group=Missing or invalid group for new directory
+savefshare_perms=Missing or invalid permissions for new directory
savemisc_fail=Failed to save options
savemisc_lockdir=The directory containing the lock directory does not exist
if ($in{'create'} eq "yes") {
defined(getpwnam($in{'createowner'})) ||
&error($text{'savefshare_owner'});
+ defined(getgrnam($in{'creategroup'})) ||
+ &error($text{'savefshare_group'});
+ $in{'createperms'} =~ /^[0-7]{3,4}$/ ||
+ &error($text{'savefshare_perms'});
}
# Update config file
# Creating a new share
&create_share($name);
if ($in{'create'} eq "yes" && !-d $in{'path'}) {
- mkdir($in{'path'}, 0755);
- @uinfo = getpwnam($in{'createowner'});
- chown($uinfo[2], $uinfo[3], $in{'path'});
- }
+ &make_dir($in{'path'}, oct($in{'createperms'}));
+ &set_ownership_permissions($in{'createowner'},
+ $in{'creategroup'},
+ oct($in{'createperms'}),
+ $in{'path'});
+ }
&save_samba_acl('rwvVsSpPnNoO', \%access, $name);
}
&unlock_file($config{'smb_conf'});