Felix Miata wrote:
I can't answer your SUSE-profile setup question, as I don't use
SUSE's profile organization. Generally, one sets umask in profile
and not in bashrc.
How do I find out the current umask setting without creating a new file
and examining its permissions? It doesn't seem to exist in the output of
the set command.
umask without parameters outputs the current umask.
I want all regular files in a particular public directory to be
rw-rw-r--. How do I set that up?
With default ACLs on the parent directory. It is not possible to set
umask for a specific directory. Btw, umask is ignored when the
parent directory has a default ACL.
There are some a nasty fine points, though: This works only for
*new* files. If one moves an existing file in that directory, that
doesn't change its access rights. Furthermore, if the creat() or
open() system call that is effectively used specifies mode bits that
are more restrictive (e.g., rw-r--r--), the intersection of the
default ACL and these mode bits is used.
I want all regular files in a particular public directory to have one
particular owner and group. How do I set that up?
In classic Unix, owner inheritance is not possible if one wants to
use the standard POSIX commands. I don't know any way to do it with
ACLs either.
Group inheritance can be done by setting the group-setid bit of the
parent directory. This does not work for files that are moved into
the directory, only for newly created files.
The normal way to solve your actual problem: Write a bunch of
commands: to copy files to that directory, rename them, and remove
them. Make them setuid to the particular user. Within the commands
use chmod to control the final access bits of the new files.
If you want to use Perl for these commands, you need either to
create setuid wrapper-scripts, or you need to enable setuid
Perl-scripts by chmod u+s /usr/bin/sperl*.
HTH,
Joachim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod Email: [EMAIL PROTECTED]
Roedermark, Germany
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]