You can use "su - john" instead of "su john" + "source ~/.profile"...

Without the dash, the environment is not changed completely (no .profile
re-read). Only the $USER and $HOME variables are changed, whereas with the dash,
a complete user change takes place, and that includes source'ng the .profile.

An easy way to notice the difference:
# cd / ; su john
$ pwd

versus

# cd / ; su - john
$ pwd

Leo

----- Original Message ----- 
From: "Tyler Godfrey" <[EMAIL PROTECTED]>
To: "Solaris-Users mailing list" <[EMAIL PROTECTED]>
Sent: Wednesday, July 30, 2003 14:06
Subject: Re: [Solaris-Users] Default permissions in a directory



--- Richard Crawford <[EMAIL PROTECTED]> wrote:
> I'm afraid that this didn't work either.  I performed all of the
> commands
> below, then did the following:
>
> # su john
> # source ~/.profile
> # touch zzzztestfile
> # ls -l zzzztestfile
>
> What I saw was:
>
> -rwxr--r-- 1 john staff 152 Jul 30 08:14 zzzztestfile

This tells me something is still wrong with umask.

Try this:
# su john
# umask 002
# touch foo.bar
# ls -l foo.bar

Are the permissions still wrong? If not, I'd try logging in as 'john'
(not just su'ing) and trying it again. If so, try (as john)
$ umask
$ umask 002
$ umask

If there is a difference between the first and third execution of
umask, then it is not being set during login.

Another place you can look is /etc/profile. This should be source by
all logins, and there may be a global umask setting there. Whichever
'umask' command is run last during login will be in force.

-Tyler


=====
--
Tyler Godfrey
[EMAIL PROTECTED]

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
Solaris-Users mailing list
[EMAIL PROTECTED]
http://www.filibeto.org/mailman/listinfo/solaris-users

_______________________________________________
Solaris-Users mailing list
[EMAIL PROTECTED]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to