rename_root = You are not allowed to move/rename the root directory.
no_users = It seems that your system doesn't support users and groups.
not_owner = You are not the owner of {FILE}, so you are not allowed to change the mode and the group.
+invalid_group = '{GROUP}' seems to be an invalid group name. Please check it and try again.
# End of configuration file
\ No newline at end of file
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-10-23
+# Last modified: 2004-10-27
#
use strict;
$tpl->fillin("URL",equal_url($config->{'httproot'},$virtual));
$tpl->fillin("SCRIPT",$script);
- $tpl->parse_if_block("editable",-r $physical && -w $physical && -T $physical && not ($config->{'max_file_size'} && $size > $config->{'max_file_size'}) && $uselist->unused($virtual));
+ $tpl->parse_if_block("editable",-r $physical && -w $physical && -T $physical && not ($config->{'max_file_size'} && $size > $config->{'max_file_size'}) && $uselist->unused($virtual));
$tpl->fillin("CONTENT",encode_entities($$content));
}
chmod($oct_mode,$physical);
}
- chgrp($group,$physical) if($group);
+ if($group)
+ {
+ return error($config->{'errors'}->{'invalid_group'},$dir,{GROUP => $group}) unless($group =~ /^[a-z0-9_]+[a-z0-9_-]*$/i);
+ system("chgrp",$group,$physical);
+ }
return devedit_reload({command => 'show', file => $dir});
}
# with only one command
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-08-05
+# Last modified: 2004-10-26
#
use strict;
use base qw(Exporter);
-@EXPORT = qw(chgrp
- dir_read
+@EXPORT = qw(dir_read
file_create
file_read
file_save
file_unlock);
-# chgrp()
-#
-# Change the group of files or directories
-#
-# Params: 1. Group name or group ID
-# 2. List of files
-#
-# Return: Number of files group successfully changed
-# (or false)
-
-sub chgrp($@)
-{
- my ($group,@files) = @_;
- my $gid = ($group !~ /^\d+$/) ? getgrnam($group) : $group;
-
- return unless($gid);
- return chown(-1,$gid,@files);
-}
-
# dir_read()
#
# Collect the files and directories in a directory
<li><b>Change mode:</b><br>
Use an <b>octal</b> number to change the mode of the file. You may use the three or four number form. For this, SetUID, SetGID and Sticky Bit are also supported.</li>
<li><b>Change group:</b><br>
-Enter the group name or the group ID the file should be assigned to.</li>
+Enter the group name or the group ID the file should be assigned to. If a group name is also a numeric group ID, the value is used as a group name.</li>
</ul>
<hr>